BUGFIX: Run validation on the final step.

This commit is contained in:
ajshort 2011-12-19 14:21:56 +11:00
parent 65d1681331
commit 4f1510ff5b
1 changed files with 7 additions and 1 deletions

View File

@ -377,7 +377,13 @@ abstract class MultiForm extends Form {
Director::redirectBack();
return false;
}
if(!$this->getCurrentStep()->validateStep($data, $form)) {
Session::set("FormInfo.{$form->FormName()}.data", $form->getData());
Director::redirectBack();
return false;
}
// Save the form data for the current step
$this->save($data);
}