function DecimalItem::fieldSettingsForm
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php \Drupal\Core\Field\Plugin\Field\FieldType\DecimalItem::fieldSettingsForm()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php \Drupal\Core\Field\Plugin\Field\FieldType\DecimalItem::fieldSettingsForm()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php \Drupal\Core\Field\Plugin\Field\FieldType\DecimalItem::fieldSettingsForm()
Overrides NumericItemBase::fieldSettingsForm
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ DecimalItem.php, line 99
Class
- DecimalItem
- Defines the 'decimal' field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
$element = parent::fieldSettingsForm($form, $form_state);
$settings = $this->getSettings();
$element['min']['#step'] = pow(0.1, $settings['scale']);
$element['max']['#step'] = pow(0.1, $settings['scale']);
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.