public function WebformUiOptionsForm::editForm in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_ui/src/WebformUiOptionsForm.php \Drupal\webform_ui\WebformUiOptionsForm::editForm()
Edit webform options source code form.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides WebformOptionsForm::editForm
File
- modules/
webform_ui/ src/ WebformUiOptionsForm.php, line 17
Class
- WebformUiOptionsForm
- Base for controller for webform option UI.
Namespace
Drupal\webform_uiCode
public function editForm(array $form, FormStateInterface $form_state) {
$form['options'] = [
'#type' => 'webform_options',
'#mode' => 'yaml',
'#title' => $this
->t('Options'),
'#title_display' => 'invisible',
'#description' => $this
->t("Descriptions, which are only applicable to radios and checkboxes, can be delimited using ' -- '."),
'#description_display' => 'before',
'#empty_options' => 10,
'#add_more_items' => 10,
'#default_value' => $this
->getOptions(),
];
return $form;
}