function TelephoneDefaultWidget::settingsForm
Same name in other branches
- 9 core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::settingsForm()
- 10 core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::settingsForm()
- 11.x core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::settingsForm()
Overrides WidgetBase::settingsForm
File
-
core/
modules/ telephone/ src/ Plugin/ Field/ FieldWidget/ TelephoneDefaultWidget.php, line 34
Class
- TelephoneDefaultWidget
- Plugin implementation of the 'telephone_default' widget.
Namespace
Drupal\telephone\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['placeholder'] = [
'#type' => 'textfield',
'#title' => t('Placeholder'),
'#default_value' => $this->getSetting('placeholder'),
'#description' => 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.