protected function ReadonlyFieldWidget::formMultipleElements in Read-only Field Widget 8
Special handling to create form elements for multiple values.
Handles generic features for multiple fields:
- number of widgets
- AHAH-'add more' button
- table display and drag-n-drop value reordering
Overrides WidgetBase::formMultipleElements
File
- src/
Plugin/ Field/ FieldWidget/ ReadonlyFieldWidget.php, line 81
Class
- ReadonlyFieldWidget
- Plugin implementation of the 'readonly_field_widget' widget.
Namespace
Drupal\readonly_field_widget\Plugin\Field\FieldWidgetCode
protected function formMultipleElements(FieldItemListInterface $items, array &$form, FormStateInterface $form_state) {
return $this
->formSingleElement($items, 0, [], $form, $form_state);
}