public function YamlFormEmailConfirm::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 YamlFormElementBase::form
File
- src/
Plugin/ YamlFormElement/ YamlFormEmailConfirm.php, line 34
Class
- YamlFormEmailConfirm
- Provides a 'email_confirm' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
$form['email_confirm'] = [
'#type' => 'details',
'#title' => $this
->t('Email confirm settings'),
'#open' => TRUE,
];
$form['email_confirm']['confirm__title'] = [
'#type' => 'textfield',
'#title' => $this
->t('Email confirm title'),
];
$form['email_confirm']['confirm__description'] = [
'#type' => 'yamlform_html_editor',
'#title' => $this
->t('Email confirm description'),
];
$form['email_confirm']['confirm__placeholder'] = [
'#type' => 'textfield',
'#title' => $this
->t('Email confirm placeholder'),
];
return $form;
}