mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
Merge pull request #30 from jedateach/pr/prev-formnovalidate
FIX: don't html5 validate prev actions
This commit is contained in:
commit
c2b736187e
@ -349,11 +349,13 @@ abstract class MultiForm extends Form {
|
||||
if($step->getPreviousStep() && $step->canGoBack()) {
|
||||
// If there is a next step, insert the action before the next action
|
||||
if($step->getNextStep()) {
|
||||
$actions->insertBefore(new FormAction('prev', $step->getPrevText()), 'action_next');
|
||||
$actions->insertBefore($prev = new FormAction('prev', $step->getPrevText()), 'action_next');
|
||||
// Assume that this is the last step, insert the action before the finish action
|
||||
} else {
|
||||
$actions->insertBefore(new FormAction('prev', $step->getPrevText()), 'action_finish');
|
||||
$actions->insertBefore($prev = new FormAction('prev', $step->getPrevText()), 'action_finish');
|
||||
}
|
||||
//remove browser validation from prev action
|
||||
$prev->setAttribute("formnovalidate", "formnovalidate");
|
||||
}
|
||||
|
||||
// Merge any extra action fields defined on the step
|
||||
|
Loading…
Reference in New Issue
Block a user