While most modifications to the Form Processing Flow should exist as custom actions, there are some circumstances for otherwise filtering the data at different places during the flow.
The general flow works in the following order:
- Field Validation
- Field Processing
- Action Processing
Before the form is processed, form submission data is filterable using the ninja_forms_submit_data hook:
FILTER: apply_filters( ‘ninja_forms_submit_data’, $form_data );
The passed array parameter contains field data, form settings, and extra data submitted by the form.
During field validation each field’s settings are filtered before calling the respective field’s validate() method.
Each field’s registered type has a process() method by which a field’s data can be modified before actions are processed.
See: Field Registration
Before being processed, the form’s actions are filterable. This is a good place to dynamically remove any actions from processing.
Before each individual form action is processed, its settings are filterable.
Before an action is triggered, a filter runs to determine if that action should be processed.
Lastly, after the submission processing, an action hook fires with the relevant form data.