mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
ENHANCEMENT prev() now saves the current step data, exactly as next() does
This commit is contained in:
parent
4d0e9491cc
commit
e4e43ee4af
@ -411,6 +411,9 @@ abstract class MultiForm extends Form {
|
||||
// Switch the step to the previous!
|
||||
$prevStepClass = $this->getCurrentStep()->getPreviousStep();
|
||||
|
||||
// Save the form data for the current step
|
||||
$this->save($data);
|
||||
|
||||
// Get the previous step of the class instance returned from $currentStep->getPreviousStep()
|
||||
$prevStep = DataObject::get_one($prevStepClass, "SessionID = {$this->session->ID}");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user