silverstripeForms


Syntax

  • Form::create($this, __FUNCTION__, $fields, $actions, $validator) // standard form creation
  • Form::create(...)->addExtraClass('my-css-class another-class') // add CSS classes to your Form
  • Form::create(...)->loadDataFrom(Member::get()->byID(1)); // populate a form with the details of an object