function ListFloatItem::storageSettingsForm
Same name in other branches
- 11.x core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php \Drupal\options\Plugin\Field\FieldType\ListFloatItem::storageSettingsForm()
Overrides ListItemBase::storageSettingsForm
File
-
core/
modules/ options/ src/ Plugin/ Field/ FieldType/ ListFloatItem.php, line 123
Class
- ListFloatItem
- Plugin implementation of the 'list_float' field type.
Namespace
Drupal\options\Plugin\Field\FieldTypeCode
public function storageSettingsForm(array &$form, FormStateInterface $form_state, $has_data) {
$element = parent::storageSettingsForm($form, $form_state, $has_data);
foreach (Element::children($element['allowed_values']['table']) as $delta => $row) {
// @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
// @see \Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget::formElement()
$element['allowed_values']['table'][$delta]['item']['key']['#step'] = 'any';
$element['allowed_values']['table'][$delta]['item']['key']['#type'] = 'number';
}
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.