mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 09:05:49 +00:00
As per next(), save step data before the validate method is called.
This commit is contained in:
parent
c00a498375
commit
b75301909b
@ -391,6 +391,9 @@ abstract class MultiForm extends Form {
|
||||
* @param object $form The form that the action was called on
|
||||
*/
|
||||
public function finish($data, $form) {
|
||||
// Save the form data for the current step
|
||||
$this->save($data);
|
||||
|
||||
if(!$this->getCurrentStep()->isFinalStep()) {
|
||||
$this->controller->redirectBack();
|
||||
return false;
|
||||
@ -402,8 +405,6 @@ abstract class MultiForm extends Form {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Save the form data for the current step
|
||||
$this->save($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user