function TelephoneDefaultWidget::settingsForm

Same name in other branches
  1. 9 core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::settingsForm()
  2. 10 core/modules/telephone/src/Plugin/Field/FieldWidget/TelephoneDefaultWidget.php \Drupal\telephone\Plugin\Field\FieldWidget\TelephoneDefaultWidget::settingsForm()
  3. 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\FieldWidget

Code

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.