fixes late extensions binding

Construct adds extensions, so calling functions which have extend calls in them before the parent:constructor means the extend calls will never find any extensions.
This commit is contained in:
John Milmine 2016-02-29 16:11:47 +13:00
parent 726e033eff
commit 249e7ca0d1
1 changed files with 6 additions and 3 deletions

View File

@ -17,11 +17,14 @@ class UserForm extends Form {
parent::__construct(
$controller,
$name,
$this->getFormFields(),
$this->getFormActions(),
$this->getRequiredFields()
new FieldList(),
new FieldList()
);
$this->setFields($this->getFormFields());
$this->setActions($this->getFormActions());
$this->setValidator($this->getRequiredFields());
// Number each page
$stepNumber = 1;
foreach($this->getSteps() as $step) {