*}name="{@$field->getPrefixedId()}" {*
*}value="{$field->getValue()}"{*
*}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
+ *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{*
*}{if $field->isAutofocused()} autofocus{/if}{*
*}{if $field->isRequired()} required{/if}{*
*}{if $field->isImmutable()} disabled{/if}{*
*}name="{@$field->getPrefixedId()}" {*
*}value="{$field->getValue()}"{*
*}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
+ *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{*
*}{if $field->isAutofocused()} autofocus{/if}{*
*}{if $field->isRequired()} required{/if}{*
*}{if $field->isImmutable()} disabled{/if}{*
* @package WoltLabSuite\Core\System\Form\Builder\Field
* @since 5.2
*/
-abstract class AbstractNumericFormField extends AbstractFormField implements IAutoFocusFormField, ICssClassFormField, IImmutableFormField, IMaximumFormField, IMinimumFormField, INullableFormField, IPlaceholderFormField, ISuffixedFormField {
+abstract class AbstractNumericFormField extends AbstractFormField implements IAutoCompleteFormField, IAutoFocusFormField, ICssClassFormField, IImmutableFormField, IMaximumFormField, IMinimumFormField, INullableFormField, IPlaceholderFormField, ISuffixedFormField {
+ use TAutoCompleteFormField;
use TAutoFocusFormField;
use TCssClassFormField;
use TImmutableFormField;
* @package WoltLabSuite\Core\System\Form\Builder\Field
* @since 5.2
*/
-class FloatFormField extends AbstractNumericFormField {}
+class FloatFormField extends AbstractNumericFormField {
+ /**
+ * @inheritDoc
+ * @since 5.4
+ */
+ protected function getValidAutoCompleteTokens(): array {
+ return [
+ 'transaction-amount',
+ ];
+ }
+}
* @inheritDoc
*/
protected $integerValues = true;
+
+ /**
+ * @inheritDoc
+ * @since 5.4
+ */
+ protected function getValidAutoCompleteTokens(): array {
+ return [
+ 'cc-exp-month',
+ 'cc-exp-year',
+ 'bday-day',
+ 'bday-month',
+ 'bday-year',
+ ];
+ }
}