Kentico CMS 7.0 Developer's Guide



Previous topic Next topic Mail us feedback on this topic!  


Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The Forms module enables non-technical users (content editors) to easily create and publish on-line forms. These forms can be used to gather structured data from website users. A typical example of such form is the Contact Us form, which can be found on the Company page of the sample Corporate Site. The form is depicted in the screenshot below.




The administration interface of the module is located in CMS Desk -> Tools -> Forms. This is where new forms can be created, as described in the Creating a new form topic. Once a form is created via the user interface, it can be added to a live site page. This can be done either via the WYSIWYG editor, or by means of the On-line form web part or widget. Both options are described in the Displaying a form on the live site topic.


Each form has its own separate database table where submitted data is stored. The submitted data can be viewed and managed in CMS Desk -> Tools -> Forms. Data records can even be exported to a Microsoft Excel spreadsheet in this part of the user interface. Please refer to the Managing form data topic for more information on which actions can be performed with the submitted data.


You may want to notify the person who is responsible for management of forms data when a new record is submitted. For this purpose, you can configure the form to send automatic notification e-mails about new records. The user who submitted the new record may also be notified that the record was submitted successfully and that it will be processed soon. This can be achieved by configuring autoresponder e-mails. Both options are described in the Notification and autoresponder e-mails sub-chapter. Macros can be used largely with notification and autoresponder e-mails, as well as when you want to localize field captions in the form. Please refer to the Using macros with forms topic to learn more.


Access to forms may be restricted, so that only members of selected roles can perform certain operations with the forms themselves or with the data in them. The Security topic gives you an overview of how to configure forms permissions both globally and separately for each particular form.


Layout of each form is fully customizable. The Defining custom form layout topic explains how it can be achieved. You may also customize behavior of the forms module with your custom code. These possibilities are explained in the Forms internals and API sub-chapter, along with an overview of where form records are stored and which API classes contain methods for their management. It also provides a series of code examples showing how methods from these classes may be used in your custom code.