Sitemap | Developers | Print
FormsSee also end user information. Creating forms within the CMS is simple using the following code: <cms type=form id=your_form_id scope=folder> ... your form fields ... </form> The CMS tag creates the opening <form> tag, but you must remember to include the closing </form> tag after your form fields. The user will be presented with two editable elements:
The target email address can be on any domain and there is no special setup required. The form may be tested within the CMS, and the form contents will be emailed to the email address associated with the user (not the website), which means that as a developer you can test forms and have the contents arrive in your own inbox without changing any settings. The ID of the form will be included in the subject line of the email as will the URL of the page on which the form is published. The forms include anti-spam measures and visitor tracking data. The same form may be used on multiple pages, multiple forms may be created and multiple forms may be used on a single page. Use the scope parameter to save time. If a form will appear on various pages but will always go to the same target page and email address set the scope to all. ValidationTo validate a field, prefix the field name with validate_ (not case sensitive), e.g.: <input type=text value="" name=validate_telephone> This provides a simple "not empty" validation for text fields. Fixed field namesEach of these field names may be prefixed with "validate_" to ensure that something is entered by the enquirer. Field names are not case sensitive. Enquirer's nameThe field name for the Enquirer's name must be either: "name" or two fields: "first_name" and "last_name" Enquirer's company"company" Enquirer's email address"email" Example 1: <cms type=form id=contact scope=all> Example 2: <cms type=form id=contact scope=page> Reserved field namesDo not prefix any field names with cms_ as these fields are used by the CMS. |