Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TelephoneDefaultWidget.php

function 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' => $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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal