icon Forms Renderer
Created by Orckestra

See also:

Related Guides:

How to create and add a form to a page

  1. From the Content or Layout perspective, insert the Composite.Forms.Renderer function ( Insert > Function), or add the following code:
    Expand code 
  2. Select the datatype to render with this form in the DataType parameter of the function (required).
  3. If necessary, specify its optional parameters:
    • Intro Text: XHTML-formatted text shown above the form before the user submits the form (no text by default).
    • Response Text: XHTML-formatted text shown instead of the intro text (if any) and the form after the user submits the form (no text by default).
    • Response URL: The page the user will be redirected to after submitting the form (no URL by default).Note: If no URL is specified, the user will not be redirected.
    • Send Button Label: The "Send" button's label text ("Send" by default).
    • Reset Button Label: The "Reset" button's label text (no text and thus not visible by default). Note: Clicking the button clears the form. If left empty, the button will not be shown.
    • Email: Details such email address and subject set up for email notifications received each time a person submits the form (not specified by default).
      • One of the ad-hoc email functions must be used here; otherwise, no notifications are sent (please see Setting up email notifications for detailed information about configuring this parameter)
    • Use Captcha: Captcha will be used on the form if the parameter is set to True. ('False', i.e. no Captcha by default). To turn CAPTCHA on, change the Value type to "Specify a simple value" and set it to 'True'.

How to make validation messages user-friendly

Some of the fields on the form may be validated against a set of rules. If the user's input does not validate, a validation error message appears above the form's fields. Normally, each validation rule has its own validation error message that might thus appear on a page with the form. This is a technical message in most cases.

To have user-friendly messages instead of the technical validation messages, you should specify the Help text for each field of the datatype that the Forms Renderer uses for a form:

  1. Edit the datatype used by the Forms Renderer
  2. Open the Fields tab and select a field under the Datatype fields.
  3. Type some user-friendly text in the Help field.
  4. Repeat Steps 2-3.

Customization

You can customization the form's layout by editing the following style sheets:

/Frontend/Composite/Forms/Renderer/Styles.css

Localization

You can localize the Forms Renderer's and Captcha's messages by creating a localization file for your languages based on the default localization file for Forms Renderer:

  1. Make a copy of Composite.Forms.Renderer.en-us.xml in ~/Composite/InstalledPackages/localization/, changing, the culture code to that of your language, e.g: Composite.Forms.Renderer.de-de.xml
  2. Translate the strings. 

Important Notes

  1. Before inserting the function on a page at least one global datatype should exist. This datatype will be used to render the form and the form's input data will be stored in it.
  2. Composite.Forms.Renderer uses the jquery library, which is not compatible with mootools.js library.
  3. The Help label from the datatype is used as the default text for validation errors. If the Help label is empty, the standard detailed Orckestra CMS validation error text will be displayed. (For more information, read How to make validation messages user-friendly.)
  4. You can set up to receive email notifications with the user's input each time the form is submitted. For more information, read Setting up email nofications.