This document guides you on rendering a form on a page.
To understand the concepts discussed in this document, you must first understand how to use the Liquid template language and form configuration options on Insites. Please visit the following links for more details:
The examples on this article uses the Form example from the previous tutorial:
To generate and display form configuration HTML code, use the include_form tag on any page, partial, or layout.
The first argument is the name of the form configuration you want to display; the second is the 'key: value' list of variables accessible in the form.
Example:
Using the form tag is the easiest way to generate an HTML form. It uses the context provided by the form configuration to define required attributes and inputs.
action
is defined based on resource context. It is translated to the correct API endpoint.
method
is defined based on the
When nothing or
Examples:
hidden inputs
the form tag generates multiple inputs.
Make sure to add necessary information if you manually create your HTML form or use third-party tools like curl to construct your request. Required request parameters are:
You can use the Instance Admin to construct forms quickly with a reduced risk of errors. For more details, please visit the Form Builder documentation.
The
Property | Description |
---|---|
URL of form configuration API endpoint; usually passed as a form action | |
list of validation errors raised on failed form submission. | |
List of fields that can be altered in the form defined in the form configuration object. Every field has the following properties:
|
|
name of form configuration | |
form configuration resource name (usually your Table name) | |
form configuration resource owner | |
an object containing data rendered within the form tag |
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.