Forms allow a user to enter the information necessary to perform a given task. A login form, for example, allows a user to connect to the system by entering their username and password.
Note: forms are used when information input is expected from the user: the login form is a simple example with two or three fields, but other forms can be much more complex.
A form is composed of fields into which information is entered before being saved into a database.
The specification of a form requires the prior definition of the corresponding Data model. Each attribute of the data model will be automatically proposed as a field in the form. For example, if the “Horse” data model is characterized by the attributes “size”, “breed”, and “color”, these three attributes will be automatically proposed as different fields in the form for creating a “Horse”. The user can modify or delete these fields or add others.
Each field of the form is defined by its label, its format (placeholder), its type, its data source (attribute of a Data model), and optionally one or more constraints indicating the error message if the constraint is not met. These constraints can be a required length (indication of minimum and maximum values), a range (character interval or indication of minimum and maximum values), “less than” and “greater than” indications (value indication), or regular expressions (unique value of the constraint).
It is possible to order the fields by drag and drop.
