Available on: Personal, Professional, Business plans
Workflow lets you quickly validate and send form data to your third-party services. Coupled with Formshield and automatic retries, Workflow provides an easily maintainable solution for the delivery of spam-free data by making it easier to ensure that form data is correct when submitted.
Workflow offers a number of features, including:
- Form actions for popular services
- A simple visual workflow builder
- Automatic mapping of form fields to third-party integrations
- Guaranteed delivery to third-party integrations via automatic retries
By default, Workflow is enabled in your form dashboard. Upon accessing the Workflow section of the form dashboard, you will find a basic Workflow configuration. To start, there is a Validation node for an email field and an Actions node for email notifications.
Adding validation rules
New validation rules can be created by clicking the +Add new link in the Validation section of Workflow. Validation rules can be created for:
- Text
- Number
- URL
- DateTime
- File
Fields should be added for validation in Workflow only if a corresponding input
tag exists in your form code. The field name listed for the validation rule must match the input
tag’s name
attribute in your form code. Each field has various attributes that control validation behavior. A full list of the validation attributes can be found here.
If the data does not meet the validation rules, a validation error will be displayed to the user, or, if submitting via AJAX, a validation error response will be sent. More information on validation errors can be found here.
Adding new actions
Once submission data is successfully validated, it passes through to Actions. Actions are behaviors initiated by a successful form submission. Your defined actions are executed in parallel – all actions happen at once, not sequentially.
Note: The Stripe plugin is an exception to the above-stated rule. Stripe is a synchronous plugin, which means that it runs before submission, allowing users to see any errors, such as a declined card.
To create new actions, click the +Add new link in the Actions section of Workflow. In addition to creating an action to send submissions to an email address, a number of third-party integrations can be employed via the Actions section of Workflows. These third-party utilities range from CRM systems and help desk services to databases and repositories.
Once an action is enabled, you can modify its settings by clicking … in the right corner of the Action node and selecting Settings. You can also disconnect an action from your workflow by clicking the Disconnect icon. To keep an Action connected but prevent it from executing its functions, toggle the Enabled option off in the Action settings.
Validation rules
Below you can find two tables. The first table defines and describes the various validation field types. The second table defines the various validation attributes available for your fields. This table also provides information on the accepted values, the supported field types, and a description of each attribute.
In addition to the explicit validation rules, which you can add via the Workflow interface, implicit validations are added automatically when an action requires it. Implicit validations are identified by the "Used by" icon in the field list. These implicit validations cannot be removed, but can be edited to be made more strict than required by the related Action. For example, when you add the email action, you also add an implicit email validation. This is to ensure that, if included in the submission, the email field is a valid email address. The email validation shows the "Used by" label to indicate that the email action added this validation.
Validation field types
Type | Description |
---|---|
datetime-local | A control for entering a date and time, with no time zone. Opens a date picker or numeric wheels for date- and time-components when active in supporting browsers. See MDN Web Docs. |
A field for editing an email address. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards. | |
file | A control that lets the user select a file. Use the accept attribute to define the types of files that the control can select. |
number | A control for entering a number. Displays a spinner and adds default validation. Displays a numeric keypad in some devices with dynamic keypads. |
tel | A control for entering a telephone number. Displays a telephone keypad in some devices with dynamic keypads. |
text | The default value. A single-line text field. Line-breaks are automatically removed from the input value. |
url | A field for entering a URL. Looks like a text input, but has validation parameters and relevant keyboard in supporting browsers and devices with dynamic keyboards. |
Validation attributes
Validation attribute | Values | Supported types | Description |
---|---|---|---|
Required | Boolean | all | Specifies whether the field is required. Available for all field types. |
Minimum value | Number or string | datetime-local, number | Specifies the minimum value. This can be used with Number, DateTime or File types. |
Maximum value | Number or string | datetime-local, number | Specifies the maximum value. This can be used with Number or DateTime types. |
Minimum length | Number | text, url, tel, email | Specifies the minimum value. This can be used with Text or URL types. |
Maximum length | Number | text, url, tel, email | Specifies the maximum value. This can be used with Text or URL types. |
Accept file types | String list | File | Specifies valid file content types. The value should be a string list with valid MIME types. Be aware that you should set the type key as file in your form. Otherwise, this rule won't be applied. |
Validation errors
If a user makes a form submission that does not comply with a validation rule as defined in Workflow, a validation error response will be sent. The user may be redirected to a validation error page, which provides more information about the error (unless the form submits via JavaScript with AJAX, in which case the error will be in the response body).
The following error codes may appear in the state object's errors array:
Code | Field Error | Description |
---|---|---|
INACTIVE | The form has been disabled | |
BLOCKED | The form has been blocked | |
EMPTY | No data was submitted | |
PROJECT_NOT_FOUND | An invalid project key was used to submit the form | |
FORM_NOT_FOUND | An invalid form hashid was used to submit the form | |
NO_FILE_UPLOADS | File uploads are not supported for this form | |
TOO_MANY_FILES | The form was submitted with too many file attachments | |
FILES_TOO_BIG | One or more files uploaded exceeded the max file size | |
REQUIRED_FIELD_MISSING | ✓ | A field is required, but no value was provided |
REQUIRED_FIELD_EMPTY | ✓ | A field is required, but a blank or empty string was provided |
TYPE_EMAIL | ✓ | A field should contain an email |
TYPE_NUMERIC | ✓ | A field should contain a number |
TYPE_TEXT | ✓ | A field should contain text |
STRIPE_CLIENT_ERROR | ✓ | Stripe key missing |
STRIPE_SCA_ERROR | ✓ | Stripe SCA error. See details |