This page documents the process of creating a form (CMS, or external) using the online editor. All other information on form-related functionalities in Ametys can be found on the following page: Forms.
The online rich fieldseditor lets you create and manage forms in your content.
In editing mode, a form is created using the following button:
|
A CMS form:
- Stores data entered by users in a database.
- This data can then be processed using the data export function in Excel format format (file CSV).
- In addition, you can define form recipients who will receive the data entered by web users.
- Finally, you can set up anacknowledgement system, enabling the user to receive a email message confirming receipt of the data in the application.
In the Edit tab, a form is represented by:
In the Form contextual tab CMS, you can add fields and format your form.
Manage the CMS form:
Selectappearance:
To keep your site accessible, the labels must be next to the fields. | |
Open in new window: check this box if you want form validation to open in a new window. |
|
Lifecycle: Select the lifecycle to be used for form entries. (see Forms page) | |
Acknowledgement of receipt: Select the field containing an address email to which the user will receive an acknowledgement of receipt | |
Success page allows you to choose a page in the sitemap to which the visitor is redirected after submitting the form. By default, a page outside the navigation is automatically generated. | |
Emails of form recipients: enter the emails of the people who will receive the data sent by users. | |
Convert to external form: All fields are retained |
|
Delete: Deletes the entire form. |
|
In the Edit tab, the external form is represented by:
In the toolbar, you can manage the form:
Manage an external form:
As with the CMS form, you can choose the appearance of the external form.
URL address to which data will be sent.
Submit in new window: check this box if you wish to open a new window after the user has validated the form.
Convert to form CMS: All fields will be retained
For each of your CMS forms, you can choose a workflow that will apply to form entries (i.e. responses submitted by visitors).
The list of lifecycles depends on your application. Lifecycles are defined by the integration: Plugin Forms - Integration manual v1.9.0
If, during the life of a form, you modify its lifecycle, the status (workflow state) of all entries will be reset.
You can then change the workflow status of entries using the "Form entries" tool.
This is a list of the types of fields you can insert in a form; their properties are described below.
Field | Editing rendering | Further information |
Simple text | ||
Text area | ||
Drop-down list | ||
Check box | ||
Selection boxes | To create a set of choice boxes :
| |
Password | Please note that the password specified by users will be stored in clear text, and can be viewed using a simple export. | |
File | ||
Hidden field | A hidden field is one that is not visible to the user. It is used to store information that will be used in post-processing or simply stored for future use. The value of this field is static. For example, an external form script may need a reference to know where the form data has been entered. In our case, the hidden field could be named fromApplication and have the value Ametys. | |
Captcha | ||
Field group | ||
Validate button | ||
Cancel button | This button is used to reset the form. |
The rendering of fields in edit mode is for information only.
The contextual tab for each field offers several parameter-setting areas:
For your site to remain accessible,radio buttons in the same group must be located within a field group.
In the case of an external form, it's important to ensure that the field identifiers match those expected by the external application.
Check the"Mandatory" box to make this field mandatory.
Check the"With confirmation" box to add a second simple text just below it, asking the user to confirm their entry. This option is mainly used to confirm a password or an e-mail address.
Pre-fill: You can choose to automatically pre-fill the field with information about the logged-in user: Last name, First name, Full name, Email or Login.
Please note that the field will only be pre-filled if the form is on a restricted-access page and a user is logged in to the site.
Rule: You can choose a predefined rule by selecting an entry from the list:
Then fill in the min and max values as required (depending on the rule selected).
If you choose"Custom", you can specify a regular expression. (See Mozilla's dedicated guide for more information on regular expressions)
Check the"Mandatory" box to make this field mandatory.
Check the"Mandatory" box to make this field mandatory.
Check the"Multiple choice" box to authorize multiple selection (using the CTRL and SHIFT keys).
The"Select list" button is used to populate the list with values.
Check the"Mandatory" box to make this field mandatory.
Check the"Checked by default" box so that the box appears checked when the form is loaded.
Identical to "checkbox", except for the"Group" property, which defines groups of checkboxes. Only one "choice box" can be selected per group.
Characters are replaced by * on the screen.
Check the"Mandatory" box to make this field mandatory.
Check"With confirmation": a second password field is added just below, to confirm the entry.
As with the "Simple text" field, you can specify"min","max" and"regular expression" rules.
Check the"Mandatory" box to make this field mandatory.
Maximum size (in MB): Maximum file size that the visitor can send via the form.
The total size of the form is limited by the server: for example, if the server limits file uploads to 10 MB per form, all the files on the form must not exceed this value.
Defines a hidden field.
Insert a Captcha in the form to protect against robots.
A field group allows you to group several fields together.
The webmaster or a contributor wishes to add a form to a page, for example a contact form.
We know that a form is one of the elements that can make up content.
The first step is to create or modify a page, and then add content to it:
A tab is displayed with the Article in edit mode. The Edit tab is displayed.
As with any Article content edition, the contributor can enter an introductory text, an image, etc...
Once editing the content, the contributor can insert a form in any rich-text area of the content. For our article, we'll add the form to the Rich Text field entitled Content.
Here's an example of a contact form in edit mode:
Here is the rendering in CMS.