*}{if $field->isImmutable()} disabled{/if}{*
*}{if $field->getMinimum() !== null} min="{$field->getMinimum()}"{/if}{*
*}{if $field->getMaximum() !== null} max="{$field->getMaximum()}"{/if}{*
+ *}{if $field->getInputMode() !== null} inputmode="{$field->getInputMode()}"{/if}{*
*}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{*
*}{if $field->getDocument()->isAjax()} data-dialog-submit-on-enter="true"{/if}{*
*}>
*}{if $field->isImmutable()} disabled{/if}{*
*}{if $field->getMinimum() !== null} min="{$field->getMinimum()}"{/if}{*
*}{if $field->getMaximum() !== null} max="{$field->getMaximum()}"{/if}{*
+ *}{if $field->getInputMode() !== null} inputmode="{$field->getInputMode()}"{/if}{*
*}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{*
*}{if $field->getDocument()->isAjax()} data-dialog-submit-on-enter="true"{/if}{*
*}>
* @package WoltLabSuite\Core\System\Form\Builder\Field
* @since 5.2
*/
-abstract class AbstractNumericFormField extends AbstractFormField implements IAutoCompleteFormField, IAutoFocusFormField, ICssClassFormField, IImmutableFormField, IMaximumFormField, IMinimumFormField, INullableFormField, IPlaceholderFormField, ISuffixedFormField {
+abstract class AbstractNumericFormField extends AbstractFormField implements IAutoCompleteFormField, IAutoFocusFormField, ICssClassFormField, IImmutableFormField, IInputModeFormField, IMaximumFormField, IMinimumFormField, INullableFormField, IPlaceholderFormField, ISuffixedFormField {
use TAutoCompleteFormField;
use TAutoFocusFormField;
use TCssClassFormField;
use TImmutableFormField;
+ use TInputModeFormField;
use TMaximumFormField;
use TMinimumFormField;
use TNullableFormField;
return $this->step;
}
+ /**
+ * @inheritDoc
+ */
+ protected function getValidInputModes(): array {
+ if ($this->integerValues) {
+ return ['numeric'];
+ }
+
+ return ['decimal'];
+ }
+
/**
* @inheritDoc
*/