private function FormButton::showBackButton in Simple multi step form 8
Same name and namespace in other branches
- 8.x src/FormButton.php \Drupal\simple_multistep\FormButton::showBackButton()
Show back button.
Parameters
array $form: Reference to form array.
1 call to FormButton::showBackButton()
- FormButton::render in src/
FormButton.php - Render form button.
File
- src/
FormButton.php, line 37
Class
- FormButton
- Class FormButton.
Namespace
Drupal\simple_multistepCode
private function showBackButton(array &$form) {
$step_format_settings = $this->stepSettings->format_settings;
if ($this->currentStep != 0 && !empty($step_format_settings['back_button_show'])) {
// Add back button and remove validation.
$form['actions']['back_button'] = [
'#type' => 'button',
'#value' => $step_format_settings['back_button_text'],
'#validate' => [
'simple_multistep_register_back',
],
'#submit' => [],
'#limit_validation_errors' => [],
'#weight' => 0,
];
}
}