mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-02 05:18:21 +02:00
BUG Write current step to session when creating it
This commit is contained in:
parent
5be0c052a5
commit
ff49a0592f
@ -195,10 +195,13 @@ abstract class MultiForm extends Form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Always fall back to creating a new step (in case the session or request data is invalid)
|
// Always fall back to creating a new step (in case the session or request data is invalid)
|
||||||
if(!$currentStep) {
|
if(!$currentStep || !$currentStep->ID) {
|
||||||
$currentStep = new $startStepClass();
|
$currentStep = new $startStepClass();
|
||||||
$currentStep->SessionID = $this->session->ID;
|
$currentStep->SessionID = $this->session->ID;
|
||||||
$currentStep->write();
|
$currentStep->write();
|
||||||
|
$this->session->CurrentStepID = $currentStep->ID;
|
||||||
|
$this->session->write();
|
||||||
|
$this->session->flushCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($currentStep) $currentStep->setForm($this);
|
if($currentStep) $currentStep->setForm($this);
|
||||||
|
Loading…
Reference in New Issue
Block a user