What is a Form?
You might think of a form as a single element on a page with some fields / inputs and a button to submit. However, in your application you may want to have some more creative or customized ways to have users interact with your data. So, when you’re creating a form in Aeropage you have a number of elements you can combine together to build the exact workflow you need.
In Aeropage a form is a combination of elements you connect together.
Form Elements
Forms are just a collection of elements that work together to collect data from a user, manipulate and send it to a database.
Inputs
Inputs are visible on screen, and allow the user to interact with values. They can see an existing value (if editing) and change it, or they can add a new value if there is none. When a group of form components have the same purpose (eg. add a record to the orders table) they will be grouped into one form payload.
Variables
You can create and update variables using actions, then pass those variables into the form. This effectively means you can turn any component into a form input. You can use repeating components or pass in variables from other places - such as URL parameters or the browser.
Variables would be passed as hidden values in a submit form action.
Actions
There are two actions that can send data to a database. Both methods can either create a new record or edit an existing one and can be triggered each time a user changes a value (on change) or when a component is clicked (on click).
Submit Form
will allow you to submit a payload that includes a group of form components, Send Data
allows you to send only hidden data without the need for a form.
Form components you add to the page will be available as groups in the submit form action.
You can also use cards as selection components, to create variables as hidden values.
Validation
You can’t always rely on a user to complete a form properly, so you may want to apply validation to make sure they have provided appropriate values in each input before doing any actions. Because you may want to use input validation on steps before submitting the data (eg in multistage forms) the input validation is applied to the event (on click) rather than specific actions.
Phone Numbers
When validation is applied to phone number inputs, only these characters are valid.