public function YamlFormMarkup::form in YAML Form 8
Gets the actual configuration form array to be built.
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 An associative array contain the element's configuration form without any default values..
Overrides YamlFormMarkupBase::form
File
- src/
Plugin/ YamlFormElement/ YamlFormMarkup.php, line 41
Class
- YamlFormMarkup
- Provides a 'yamlform_markup' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
$form['markup']['markup'] = [
'#type' => 'yamlform_html_editor',
'#title' => $this
->t('HTML markup'),
'#description' => $this
->t('Enter custom HTML into your form.'),
];
return $form;
}