Managing form elements

On the "Form" menu on the sidebar you have access to:

  • The management of form elements,
  • To the module categories,
  • To the module parameters (by clicking on the icon to the right of the tab).

Module parameters

The parameters correspond to general preferences:

  • The default language when you manage form elements.  You must input a valid language code (fr or en),
  • The name of the wysiwyg toolbar used for editing the form.  The default toolbar "cms_forms" contains tools management for the forms creation assistant, which is essential for the creation of forms.

Module categories

These permit organizing or refining your rights for different forms.  Managing form elements permits accessing the ensemble of existing forms and filtering them by lanagauge and/or categories.

Creating a new form

Click on "New", taking care that you are in the language in which you want to create the form (for this click on the radio button for the desired language).

In the title field, specify a name that allows you to identify your form.  This label will appear in the editing row when you want to add a form to one of your pages.

You can next choose to render a form active or not active.  An inactive form is not visible immediately (thus pointless to refresh the page).

In the source field, you can create your form.  For this click on the form assistant icon.

This assistant permits adding several kinds of fields.  It also plays an essential role in generating unique form tags saved in a database.

The different kinds of fields you can add are:

  • Text field: text zone on one line.  You can edit the default value for the field.
  • Email: text zone on one line.  A control of the vaildity of the email will be effected at the submission of the form.  You can edit the dafault value for the field.
  • Numbers: text zone on one line.  A control of the validity of characters will be effected at the submission of the form.  You can edit the default value for the field.
  • URL: text zone on one line.  A control of the validity of the URL will be effected at the submission of the form.  You can edit the default value for the field.
  • Password: password text zone.  Stars appear in place of the characters input by the user.  You can edit the default value for the field.
  • Attachments: field allowing the user to choose a file on his or her computer.  This file will be attached in the case of in the case of a form which involves sending an email. You can edit the default value for the field.
  • Text zone: multi-line text zone. You can edit the default value for the field.
  • Multiple choice: create a field of selection values. You can edit the values for the field.
  • Check box: for creating check boxes. You can edit the default value for the field. (0 or 1)
  • Hidden field: permits inserting a field invisible to the user (to transmit data at the submission of a form with an eye towards handling them later).
  • Validate button: at least one field of this sort  is necessary per form so that the user can submit the form.

To add a field, choose the type of field and click on "Add".

The field appears in the area above.  For each of these fields you can specify:

  • If it is obligatory or optional.
  • Its label.  If you make it obligatory, please indicate this to the user with a * before the label, for example.  XHTML is supported in this field; it will be encapsulated within a "label" tag linked to the field.
  • In options, you can, according to the case, modify the default value by clicking on "Default", or modify available values by clicking on "Values".
  • In the actions column you can choose to delete a field or to modify its order relative to other fields.
  • Click on "Validate" to confirm field creation.

Modifiying the default value:

Click on "Default", input the value and click on "Return to the form".

Attention, if you click directly on "OK" you will validate the field structure and the actions performed previously in the assistant, but not the value just immediately input.

You can enter a value for the general variables, respecting the syntax described.

Modifying the values:

  • Click on "Values",
  • In the "Text" field, input the text visible to the user,
  • In the "Value" field, input the value trasmitted at the submission of the form,
  • Click on "Add"  to add the couple "text/value" to the list of values.

In the values field, you can modify the order of values in the list and choose one to be selected by default.

Click on "Return to the form" to validate your input.

Attention, if you click directly on "OK" you will validate the field structure and the actions performed previously in the assistant, but not the value just immediately input.

Once your field has been created, you can modify the format using classic wysiwyg tools.

Finally, select the form categories, limit the number of user responses and validate.  You will see your form appear in the list of existing forms.

Modifying a form

To modify a form you can:

  • Modify all the fields at once:  For this click on the form assistant icon.  Be careful, however, as the validation of field creation reinitializes the form in the wysiwyg and you lose your formatting.
  • Modify only one field. For this, right-click on the field or its label.  In the context menu, click on "Modify the field".
  • Add a field. For this, right-click on the desired placement.  In the context menu click on "Add a field".
Next page


Bookmark and Share

Top