Action Timing and Priority

Form actions process in a pre-defined timing and priority system. “Timing” refers to the general group within which an action is processed and “priority” refers to the specific order within that group.

Timing

Timing is broken up into three general groups: Early, Normal, and Late. Most actions will be grouped into the “Normal” timing, which is the default setting. The necessary timing of an action is determined by its relation to and dependence on other actions attached to a form.

The general reason for each timing is as follows:

Early Timing

Most closely related to “pre-processing”, the “Early” timing group ensures that these actions process before most others.

Normal Timing

Most closely related to normal “processing”, most custom form actions will use the “Normal” timing group. The “Normal” timing group is where most form submission data manipulation should happen.

Late Timing

Most closely related to “post-processing”, the “Late” timing group assumes that the form data is no longer needing to be modified.

Example: The Email, Success Message, an Redirect actions process in the Late group so as to assume that form processing is complete.

Priority

Within each Timing group action processing can be further organized by setting a priority. An action priority is most closely related to a WordPress hook’s priority parameter: lower number priorities process earlier; higher number priorities process later.

Timing/Priority Example

For example, the “Save” action type, which saves submitted form data to the database, is grouped in the “Late” timing. This allows the submission to be created after most general actions are processed. Any actions processed after the “Save” action will have access to the created submission, while any actions processed before will not.