The Ninja Forms Action System is how Ninja Forms processes form submission data.
Submission Actions are like modules which can be added to a form.
Multiple actions can be added to a single form, and likewise, a single Action Type can be added to multiple forms.
Actions extend the NF_Abstracts_Action base class.
The $_name property is a unique slug used to identify the action type.
The $_nicename property is displayed in the builder when a user adds an action to a form. The nicename should be a translated string, thus should be set in the action class constructor.
The $_tags property is an array of keywords which are used when searching, or filtering, actions in the builder. These keywords are used in addition to the action nicename for search results.
The $_timing property is used to group actions during processing, which are then weighted by the $_priority property.
Available Timing Options:
Early actions process before Normal and before Late.
These actions do not rely on processed data or are required for other actions.
Examples: Collecting Payments
Normal actions process after Early and before Late.
These actions have access to the processed results of the early actions.
Examples: Newsletter Signups
Late actions process after Early and after Normal.
These actions can rely on other processing, but should not make any changes that other actions should rely on.
Examples: Success Messages, Redirects, Emails.
The $_priority property is used to weight the action processing order within the $_timing groups.
The $_settings property accepts an array of settings, following an array format shared with Fields.
For a list of accepted settings properties and a list of basic settings, see the article on Settings Configuration.
For saving “extra” data during submission, data that is not field data, update the extra key in the $data parameter before returning.