mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +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)
|
||||
if(!$currentStep) {
|
||||
if(!$currentStep || !$currentStep->ID) {
|
||||
$currentStep = new $startStepClass();
|
||||
$currentStep->SessionID = $this->session->ID;
|
||||
$currentStep->write();
|
||||
$this->session->CurrentStepID = $currentStep->ID;
|
||||
$this->session->write();
|
||||
$this->session->flushCache();
|
||||
}
|
||||
|
||||
if($currentStep) $currentStep->setForm($this);
|
||||
|
Loading…
Reference in New Issue
Block a user