Tutorial by Examples

Here is a basic example form with one required text field and one submit button, which submits to a custom function: class Page_Controller extends ContentController { private static $allowed_actions = array( 'ExampleForm' ); public function ExampleForm() { $fiel...
SilverStripe has reasonably good support for submitting form data using AJAX requests. Below is example code of how to set up a basic Form that accepts submissions by both AJAX and traditional default browser behaviour (as is good practice). Adding the form to our controller First we need to defin...

Page 1 of 1