function EmailDefaultWidget::settingsForm
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EmailDefaultWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\EmailDefaultWidget::settingsForm()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EmailDefaultWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\EmailDefaultWidget::settingsForm()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EmailDefaultWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\EmailDefaultWidget::settingsForm()
Overrides WidgetBase::settingsForm
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ EmailDefaultWidget.php, line 35
Class
- EmailDefaultWidget
- Plugin implementation of the 'email_default' widget.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['size'] = [
'#type' => 'number',
'#title' => $this->t('Textfield size'),
'#default_value' => $this->getSetting('size'),
'#required' => TRUE,
'#min' => 1,
];
$element['placeholder'] = [
'#type' => 'textfield',
'#title' => $this->t('Placeholder'),
'#default_value' => $this->getSetting('placeholder'),
'#description' => $this->t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format.'),
];
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.