public function FormStep::settingsForm in Simple multi step form 8.x
Same name and namespace in other branches
- 8 src/Plugin/field_group/FieldGroupFormatter/FormStep.php \Drupal\simple_multistep\Plugin\field_group\FieldGroupFormatter\FormStep::settingsForm()
File
- src/
Plugin/ field_group/ FieldGroupFormatter/ FormStep.php, line 49
Class
- FormStep
- Plugin implementation of the 'form_step' formatter.
Namespace
Drupal\simple_multistep\Plugin\field_group\FieldGroupFormatterCode
public function settingsForm() {
$form = parent::settingsForm();
$form['label']['#title'] = $this
->t('Step title');
$form['show_step_title'] = array(
'#title' => $this
->t('Show step title'),
'#type' => 'checkbox',
'#default_value' => $this
->getSetting('show_step_title'),
'#description' => $this
->t('Show step title'),
'#weight' => 1,
);
$form['back_button_show'] = array(
'#title' => $this
->t('Show back button'),
'#type' => 'checkbox',
'#default_value' => $this
->getSetting('back_button_show'),
'#description' => $this
->t('Back button for form. Don`t show on first step'),
'#weight' => 2,
);
$form['back_button_text'] = array(
'#title' => $this
->t('Text for back button'),
'#type' => 'textfield',
'#default_value' => $this
->getSetting('back_button_text'),
'#description' => $this
->t('Text which will be show on back button'),
'#weight' => $form['back_button_show']['#weight'] + 0.1,
);
$form['next_button_text'] = array(
'#title' => $this
->t('Text for next button'),
'#type' => 'textfield',
'#default_value' => $this
->getSetting('next_button_text'),
'#description' => $this
->t('Text which will be show on next button'),
);
return $form;
}