This document provides an overview of all form configuration options.
To be able to follow this topic, you must first understand the following subjects:
The code below presents all possible form configuration options and the optional form implementation part after the YAML section. All possible configuration options will be explained in detail in the following section.
The configuration part of the form, in between the
The implementation part is displayed as HTML to your user. It is optional because sometimes you only want to configure the server, and the request will come from another source, like in the example tutorial from Building a Contact Form.
There is only one required form configuration option which is
Use this option to indicate the name of your
This example demonstrates the usage of a dynamic resource from a Table.
This example demonstrates the usage of a pre-defined class resource.
This section details the various optional form configuration options on Insites.
To reference your form in other places, you need an identifier - Insites use
For app/forms/full_form_example.liquid - the part marked out in bold is the default name (physical_file_path).
If you set it to something else, the new value becomes the new name for your form. It is recommended to leave this setting at default; that way, you can always tell your form's name from the file location.
Remember that all the module naming rules apply if you are referencing a form inside a module.
Asynchronous actions that run in a background job. This action does not block or halt the execution of the program flow, nor does it slow down the response to the user. This option accepts the following parameters:
Priority timeouts:
Priority | Timeout |
---|---|
high | 1 minute |
default | 5 minutes |
low | 4 hours |
Keep them in mind when writing code so that it runs fast enough for its priority.
Example:
Array; contains a list of names of Permissions that guard against unauthorised submissions.
Boolean; controls whether a form will be available as an endpoint (which is deprecated). If
String; Liquid Template code that is executed synchronously (slows down the response to the user) as soon as the form is successfully validated.
Object; fields allowed to be passed to the form object and validation rules for each defined field. Every property added to the configuration is accessible in the
property_options
Example:
JSON-formatted String; this option is merged with user data provided in the form submission.
Array; email notification names executed after the form is successfully submitted.
Array; text message notification names executed after the form is successfully submitted.
Array; API Call Notification names executed after the form is successfully submitted.
String; message that is passed to the
String; message that is passed to the
String; defines the page path rendered after successful form submission. Example:
For example, onboarding step 3 could have this code if it were preferred to save the progress (by submitting a form) the user made on the form and go back/forward afterwards:
String; defines the user permissions schema of the form configuration.
Available values are:
The table below shows all possible resource owners for different resources:
Resource | Available resource owners |
---|---|
User | self, anyone |
Record | creator, anyone |
This configuration option is very useful when you restrict user permissions to allow certain users to modify only the records they previously created.
Object, strategy and configuration for strategy. There are available strategies
Config for
Config for
Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.