Forms Overview
The CMS provides a simple way for creating and using forms on your site.
Features:
- configurable: email where form submissions are sent, and email where notifications should come from.
- ability to create text sections as well different form elements including:
text fields, text areas, drop down menus, check boxes, radio buttons, and captcha security input. - customizable submit button image
- customizable result page after the form is submitted.
- forms can also be associated with Events that have RSVP enabled as well as E-Commerce products.
Implementation Overview
It is a two step process which involves configuring the form in the control panel and then using the API to call that form from the client website.
Creating the Form
Navigate to Connect > Forms to start creating your form. For more information on how to create a new form with custom fields, see this help page.
Placing the Form on Front End
A very simple getContent or Monklet can be used to place the form on the website itself. If you use the Monklet method, ensure the page that you are using that monklet on has "nocache" in the getContent that is pulling in the Monklet.
<? getContent(
"form",
"find:form-slug",
"nocache");
?>
tag="form"
find="form-slug"
Pasting the Monklet code above directly to the Page or Section Editor (not the template) instead of creating a monklet will allow you to call different forms without creating a separate monklet for each form call.
Each form element will have a label and various hooks that can be used for styling. The form will have the same ID as the form slug.
Form Data & Results
Once the form is submitted the contents of the form will be e-mailed to the e-mail address configured when the form was created and the data will be stored at the CMS.
The form data can be accessed by clicking on 'view data' on the form listing screen under Connect > Forms.
Placing the Form Values on the Front End
A very simple getContent or Monklet can be used to place the form on the website itself. If you use the Monklet method, ensure the page that you are using that monklet on has "nocache" in the getContent that is pulling in the Monklet.
<? getContent(
"form",
"find:form-slug",
"display:list",
"show: <a href=__form-submit-link__>Click here!</a> to see __form-field-first-name__'s personal information!",
"nocache");
?>
A template needs to be created called ekk_formvalues.php and the following getContent() needs to be placed in it in order to display more detail about a form submission.
<? getContent(
"form",
"find:".$_GET['keyId'],
"display:detail",
"show: On __form-submit-date__, __form-field-first-name__ entered their telephone number into the database, and so here it is: __form-field-telephone__",
"nocache");
?>
If the above getContent does not work, try doing a 'Load Config' from the backend to update the .htaccess rules for your site.
NOTE: It is important to note that if a form is deleted in the Control Panel, all data will be deleted as well.