mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-06-13 08:24:54 +02: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…
Reference in New Issue
Block a user