Merge pull request #1858 from oddnoc/form-documentation-edit

Edit forms documentation
This commit is contained in:
Andrew Short 2013-05-08 18:34:01 -07:00
commit c1d25d17ce

View File

@ -7,18 +7,18 @@ and handle the actions and data from a form.
A fully implemented form in SilverStripe includes a couple of classes that individually have separate concerns.
* Controller - Takes care of assemble the form and recieving data from it.
* Controller - Takes care of assembling the form and receiving data from it.
* Form - Holds sets of fields, actions and validators.
* FormField - Fields that recieves data or displays them, e.g input fields.
* FormField - Fields that receive data or displays them, e.g input fields.
* FormActions - Often submit buttons that executes actions.
* Validators - Validates the whole form, see [Form validation](form-validation.md) topic for more information.
* Validators - Validate the whole form, see [Form validation](form-validation.md) topic for more information.
Depending on your needs you can customize and override any of the above classes, however the defaults are often
sufficient.
## The Controller
Forms start at the controller. Here is an simple example on how to set up a form in a controller.
Forms start at the controller. Here is a simple example on how to set up a form in a controller.
**Page.php**