mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
ENHANCEMENT Don't validate if hitting the "prev" action
This commit is contained in:
parent
2bb5983f19
commit
4d0e9491cc
@ -106,7 +106,10 @@ abstract class MultiForm extends Form {
|
|||||||
$this->fields->push(new HiddenField('MultiFormSessionID', false, $this->session->$urlMethod));
|
$this->fields->push(new HiddenField('MultiFormSessionID', false, $this->session->$urlMethod));
|
||||||
|
|
||||||
// Set up validator for the step
|
// Set up validator for the step
|
||||||
|
// @TODO Fix this hack to stop validation if hitting the "prev" action
|
||||||
|
if(empty($_REQUEST['action_prev'])) {
|
||||||
$this->setValidator();
|
$this->setValidator();
|
||||||
|
}
|
||||||
|
|
||||||
// If there is form data, we populate it here (CAUTION: loadData() MUST unserialize first!)
|
// If there is form data, we populate it here (CAUTION: loadData() MUST unserialize first!)
|
||||||
if($currentStep->loadData()) {
|
if($currentStep->loadData()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user