Actions

Configuring actions that fire on submission of a form

Actions are ways of extending Form.io to perform tasks when there is form submission activity. These actions can be triggered when certain things occur like a form submission, submission update or deletion, and so on. There can be multiple actions on any given form providing the ability to initiate different business workflows. For example, you can authenticate a user account against your User Resource, send an email with data details, or fire off a webhook to send the data to an external system.

Adding an Action

To add an action, go to the Actions tab of a form. Select the type of action from the dropdown then click the Add Action button. You can add multiple actions to run on each form submission.

Click the Edit icon to open the action's configuration settings. Click the red Trash Can icon to delete the action from the Form or Resource.

Common Settings

All actions perform different functions, however, many of the actions share some common settings that can be configured by the user.

Title: The name or label of the action. Modify the Title to provide more of a description of the action's specific purpose or function. The Title will display on the Action overview page.

Handler: The handler determines whether the action will be sent Before or After the MongoDB query mechanism (that is, before or after your submission is saved to the database). If you select both, it will run twice, once before your submission is saved and once after.

Method: The Method determines when to run this action on a form. Select which system events will trigger this action:

  • Create - Action will fire when a new submission is created

  • Read - Action will fire when a submission is Read (or viewed)

  • Update - Action will fire when a submission is updated

  • Delete - Action will fire when a submission is deleted

  • Index - Action will fire when indexing (or searching) a submission within the Database

Action Conditionals: Use the Simple conditional dropdown workflow or write your own Javascript to execute the action only when certain conditions have been met on the Form or Resource. The Conditional system is the same system used to facilitate field conditions.

Read more about Conditions here

Action Logs

circle-info

Action Logs are part of the Security Module only. Please contact [email protected] for more information on adding the Security Module to your current License Subscription.

Action Logs will display a log of triggered actions and relevant contextual information about those executions. This feature must first be enabled on a per form basis before the Action Logs are documented. Click the 3 dotted settings button, Action Logs, then select Enabled from the setting dropdown.

Once enabled, any executed action will be documented within the Logs. Each log provides the user with relavent information that can be searched and filtered like the Date/Time, Action type, or the Action status, which can be particularly helpful when finding a failed action.

  • Date/Time - Indicates when the log was recorded

  • Submission - Provides the Submission ID the Action is associated with.

  • Action - Details the type of action

  • Handler - Determines if the action was executed before or after the submission

  • Method - What Submission CRUD operation the action was executed

circle-exclamation

Clicking a line item in the Log will give you detailed information about the Action's execution process. This can be very helpful when tracking down any issues that might be occurring with the Action.

Last updated

Was this helpful?