Version 6 pre-stable
This version of Silverstripe CMS has not yet been given a stable release. See the release roadmap for more information. Go to documentation for the most recent stable version.

Forms

The Form class provides a way to create interactive forms in your web application with very little effort. Silverstripe CMS handles generating the correct semantic HTML markup for the form and each of the fields, as well as the framework for dealing with submissions and validation.

Introduction to Forms
An introduction to creating a Form instance and handling submissions.
Form Validation
Validate form data through the server side validation API.
Form Templates
Customize the generated HTML for a FormField or an entire Form.
Form Security
Ensure Forms are secure against Cross-Site Request Forgery attacks, bots and other malicious intent.
Form Transformations
Provide read-only and disabled views of your Form data.
Tabbed Forms
Find out how CMS interfaces use jQuery UI tabs to provide nested FormFields.
Using GridField with Arbitrary Data
Details about using the GridField class for managing data which isn't represented by DataObject models.

FormField documentation

Common FormField type subclasses
A table containing a list of the common FormField subclasses.
DateField
How to format and use the DateField class.
Rich-text editing (WYSIWYG)
Silverstripe CMS's use and configuration of TinyMCE html editor.
GridField
How to use the GridField class for managing tabular data.

How to's

How to Encapsulate Forms
Learn how to move a form from a controller into its own class definition.
How to Create Lightweight Form
Create a simple search form with Silverstripe CMS
Create a GridField Component
Customise your GridField with a variety of add-ons.
How to add a custom action to a GridField row
Handle custom actions on your GridField
Simple contact form
Create a form that submits a message via email
How to handle nested data in forms
Forms can save into arrays, including has_one relations

API documentation