DotAdmin User Guide
Forms
All forms on your website can be handled by dotAdmin's form processor, which is located at [YOUR WEB ADDRESS]/content/form. To use the form processor, set your form action to "/content/form" eg:
<form action="/content/form" method="post">
Note: The dotAdmin form processor will accept and process either GET or POST data, with POST data superceeding GET data; ie POST data will always overwrite GET data if both are sent to the form processor.
Special Fields
The form processor accepts a number of special fields, which can be used to set required fields, specify how data is to be processed and stored, and to sign users up to your dotAdmin mailing list:
- required
- A comma separated list of required fields in this form. This value would normally be provided as a hidden field:
<input type="hidden" name="required" value="[field1,field_2,field_3,etc,etc]" />
- email
- The website user's email address. This is the address that will be set as the reply-to address of any email notification sent to the site admins, and stored in the dotAdmin mailing list if a mailing list subscription is made. If this field is set as a required field in the "required" list, then it will be validated to check that it is a properly formatted email address. This field would normally be provided as text field for the user to fill in:
<input type="text" name="email" />
- subscribe
- If subscribe is set to "yes". then the content of the "email" field will be validated and stored in the dotAdmin mailing list. This field would normally be provided as a checkbox for the user to check:
<input type="checkbox" name="subscribe" value="yes" /> Check this check box if you wish to receive periodical offers and updates from this site.
Important! The EU and the US both have legislation in place which covers how an individual's email address can legally be added to a mailing list. As a guideline, the simplest interpretation is that the website user must have actively agreed to be on the mailing list. We would recommend that you do not set this field as a hidden field, or to be checked by default unless you have website Terms & Conditions, Privacy Policy, or other legal cover which would allow you to do so.
- subscribe_filter_[FILTER_NAME]
- If subscribe is set to "yes". then the content of the "email" field will be added to the filtered mailing list [FILTER_NAME] In addition to the main mailing list. This field can be provided as either an additional checkbox, or as a hidden field.
- notify
- The username or email address of the dotAdmin user to whom the form data should be emailed. The user must be valid dotAdmin CMS user with privilege higher than “cleared”. If this field is not provided, or remains blank, then form submissions will not be emailed. This value would normally be provided as a hidden field:
<input type="hidden" name="notify" value="[username]" />
- notify_subject
- The subject line of the email which will be sent to the dotAdmin user. This value would normally be provided as a hidden field:
<input type="hidden" name="notify_subject" value="[subject line text]" />
- store_data
- Determines whether to store this data from this form submission in the dotAdmin form data database for later collection as CSV or XML data (see Form Data Collection for more details). the value you of this field can be either "yes" or "no", with the form processor defaulting to "yes". This value would normally be provided as a hidden field:
<input type="hidden" name="store_data" value="[yes/no]" />
- datagroup
- Stored data from more than one page can optionally be grouped together under a datagroup name entered in this field (see Form Data Collection for more details). The value of this field must be consist of lowercase letters and numbers only, with no spaces or other characters. If the value in this field complies with this requirement, then the data from the form will be filed under that name in the "By Group" heading of the form data collection interface. This value would normally be provided as a hidden field:
<input type="hidden" name="datagroup" value="[name]" />
- thankyou_page
- Although the form processor will serve up a standard thankyou page by default (see "Output" below for more details), the form processor can also be set to forward users to a custom thankyou page specified in this field. The value of this field must the ID of a valid page in the dotAdmin site. This value would normally be provided as a hidden field:
<input type="hidden" name="thankyou_page" value="[id]" />
- error_page
- Although the form processor will serve up a standard error page by default (see "Output" below for more details), the form processor can also be set to forward users to a custom error page using specified in this field. The value of this field must the ID of a valid page in the dotAdmin site. This value would normally be provided as a hidden field:
<input type="hidden" name="thankyou_page" value="[id]" />
- email_response
- The ID of a tempalte in the dotAdmin CMS which will be used to send the website user a response email. This is not a required value, but is useful if you want to send some kind of immediate reponse to the user. This value would normally be provided as a hidden field:
<input type="hidden" name="email_reponse" value="[template_id]" />
- email_response_subject
- The subject line text to be used in the response email to the website user. This value would normally be provided as a hidden field:
<input type="hidden" name="email_response_subject" value="[subject_line_text]" />
- rp
- Some web browsers may not send the HTTP_REFERER header neccesary for the correct functioning of data storage and error page output in the form processor. This value will be used in substitute of the absent HTTP_REFERER in data storage and error page output. This value would normally be provided as a hidden field and can usually be set from the {id} template element in most scenarios:
<input type="hidden" name="rp" value="{id}" />
- rz
- Some web browsers may not send the HTTP_REFERER header neccesary for the correct functioning of data storage and error page output in the form processor. This value will be used in substitute of the absent HTTP_REFERER in error page output. This value would normally be provided as a hidden field and can usually be set from the {zone} template element in most scenarios:
<input type="hidden" name="rz" value="{zone}" />
- confirmation_mail
- Reserved for future development
Output
The form processor's default output is provided by the form_processor template, to be found in the CMS > Templates > Process zone of dotAdmin. See The Form Processor Template for details on how to edit this template.
|