function BooleanCheckboxWidget::settingsForm
Overrides WidgetBase::settingsForm
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ BooleanCheckboxWidget.php, line 35
Class
- BooleanCheckboxWidget
- Plugin implementation of the 'boolean_checkbox' widget.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['display_label'] = [
'#type' => 'checkbox',
'#title' => $this->t('Use field label instead of the "On" label as the label.'),
'#default_value' => $this->getSetting('display_label'),
'#weight' => -1,
];
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.