As of the dotCMS 1.9 version, Forms can now be created quickly and easily with no knowledge of HTML or velocity and placed on HTML pages in the same way that content is contributed to a page. A Structure Type called "Form" has been added to the dotCMS which can be used to define Form structures whose content can now be placed as Form content on any content container, on any HTML page.
For full control over all the HTML in a form, webmasters can also create Custom HTML FormsImportant Note for System Administrators
Captcha validation is required by default in all legacy forms. This is a default setting that is configured in the dotmarketing-config/properties file.
FORCE_CAPTCHA=true (true is the default)
However, the captcha functionality requires certain files that can be found in the following directory:
Upon installation of the dotCMS, all the endorsed jars found in the directory above should be moved into the servers Java /lib directory before starting the dotCMS server.
Advantages of Forms as Structured Content
- Setting up forms fields no longer requires any knowledge of HTML or Velocity
- Forms can now be quickly placed/re-used as content and placed on any HTML page
- Form submissions are now stored as content and can be extracted dynamically on any HTML page making it very easy to create custom form reports and permission the viewing of the form submissions.
- Form code is not exposed to content contributors who have access to an HTML page where the form resides
- Consistency in form field *styling through the use of the Dojo toolkit.
To get started creating forms see the Form Creation documentation
*Form field styling can be easily customized by passing a CSS file to a template through the use of a velocity variable. For more information see the Form Creation documentation
Custom HTML Form Creation
Although it is now recommended that Forms be created as structured content using the *Form Structure Type (See Form Creation), webmasters can also opt to create custom HTML forms and drop the HTML code in a widget on any page. Custom HTML Forms can be created using either of the following methods:
- Using the Form Builder
- Manually using certain required form fields and actions (See Manual HTML Form Creation)