mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
BUGFIX $this->form wasn't accessible on MultiFormStep because it wasn't being set by MultiForm->__construct() early enough in the piece
This commit is contained in:
parent
69b5cd6686
commit
1b662ff9e1
@ -90,6 +90,12 @@ abstract class MultiForm extends Form {
|
||||
// step or creates a new one if none available)
|
||||
$currentStep = $this->getCurrentStep();
|
||||
|
||||
// Set the step returned above as the current step
|
||||
$this->setCurrentStep($currentStep);
|
||||
|
||||
// Set the form of the step to this form instance
|
||||
$currentStep->form = $this;
|
||||
|
||||
// Set up the fields for the current step
|
||||
$fields = $currentStep->getFields();
|
||||
|
||||
@ -109,12 +115,6 @@ abstract class MultiForm extends Form {
|
||||
// Give the fields, actions, and validation for the current step back to the parent Form class
|
||||
parent::__construct($controller, $name, $fields, $actions, $validator ? $validator : null);
|
||||
|
||||
// Set the step returned above as the current step
|
||||
$this->setCurrentStep($currentStep);
|
||||
|
||||
// Set the form of the step to this form instance
|
||||
$currentStep->form = $this;
|
||||
|
||||
// Set a hidden field in the form to identify this session.
|
||||
// Depending on what has been configured for $url_type, we
|
||||
// find an encrypted hash by default to identify the session.
|
||||
|
Loading…
Reference in New Issue
Block a user