public function YamlFormUiOptionsForm::editForm in YAML Form 8
Edit form 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 YamlFormOptionsForm::editForm
File
- modules/
yamlform_ui/ src/ YamlFormUiOptionsForm.php, line 19
Class
- YamlFormUiOptionsForm
- Base for controller for form option UI.
Namespace
Drupal\yamlform_uiCode
public function editForm(array $form, FormStateInterface $form_state) {
$form['options'] = [
'#type' => 'yamlform_options',
'#mode' => 'yaml',
'#title' => $this
->t('Options'),
'#title_display' => 'invisible',
'#empty_options' => 10,
'#add_more' => 10,
'#required' => TRUE,
'#default_value' => $this
->getOptions($form, $form_state),
];
return $form;
}