mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
commit
4d027d295e
@ -54,6 +54,7 @@ abstract class MultiForm extends Form {
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $get_var = 'MultiFormSessionID';
|
private static $get_var = 'MultiFormSessionID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These fields are ignored when saving the raw form data into session.
|
* These fields are ignored when saving the raw form data into session.
|
||||||
* This ensures only field data is saved, and nothing else that's useless
|
* This ensures only field data is saved, and nothing else that's useless
|
||||||
@ -205,9 +206,15 @@ abstract class MultiForm extends Form {
|
|||||||
|
|
||||||
// Determine whether we use the current step, or create one if it doesn't exist
|
// Determine whether we use the current step, or create one if it doesn't exist
|
||||||
$currentStep = null;
|
$currentStep = null;
|
||||||
if(isset($_GET['StepID'])) {
|
$StepID = $this->controller->request->getVar('StepID');
|
||||||
$stepID = (int)$_GET['StepID'];
|
if(isset($StepID)) {
|
||||||
$currentStep = DataObject::get_one('MultiFormStep', "\"SessionID\" = {$this->session->ID} AND \"ID\" = {$stepID}");
|
$currentStep = DataObject::get_one(
|
||||||
|
'MultiFormStep',
|
||||||
|
array(
|
||||||
|
'SessionID' => $this->session->ID,
|
||||||
|
'ID' => $StepID
|
||||||
|
)
|
||||||
|
);
|
||||||
} elseif($this->session->CurrentStepID) {
|
} elseif($this->session->CurrentStepID) {
|
||||||
$currentStep = $this->session->CurrentStep();
|
$currentStep = $this->session->CurrentStep();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user