What is a form action?
A form action corresponds to handling data input by the user. At the moment a user validates a form, the input information is collected and handled according to actions you can define.
The form module makes features for handling data available which permit you to manage input data without any development knowledge.
Modifying and adding form actions
To modify form actions, the succession of treatments performed when a form is submitted, click on "Form actions" for the form created.
Several actions are possible and their parameters modifiable.
By default, many types of actions are available; they can be used freely, or not.
Please validate each type of action individually.
You can add actions and combine existing ones. Sending an email can be repeated as many times as necessay.
In a text zone, you can insert general variables respecting the syntax described in the actions window.
One action can authenticate a user. Within a site with restricted space, you can choose to create a form which will authenticate a user and allow him to access a certain part of your site.
This requires:
- activating the Automne parameters option which stipulates that your site uses user authentification. This will make it possible to the verify current user's rights regarding the element he or she is trying to see, on all the pages of the site.
- having defined the users and their rights. In particular, verify the rights of the "Public user", which correspond to an unidentified user. Only users having an Automne account can be authenticated through your form.
Finally, your form must contain at least one field alllowing one to login (Text field) and to input a password (Password field). You can also allow the user to remember their account, in which case you must add a boolean field to your form.
These fields must be next identified in the form actions. Automne lists the fields which correspond to the criteria of the field type for each of the fields necessary to authenticate the user.
Implementation in Automne
Adding a form to a page generates the file /automne/templates/mod_cms_forms_header.php.; it is included when the page is refreshed. This file will be handled first, before the page which includes the form is displayed.
This file contains all the treatment data desired and defined in the form actions.
The forms generated by this module use the POST method to send data and the file brought up by the action tag of the current page.
Exporting form data
As soon as forms are submitted online, you can export their content in .csv by clicking on the link "Download form dat in .CSV format".