*}{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}{*
+ *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
*}>
{if $field->isI18n()}
*}{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}{*
+ *}{foreach from=$field->getFieldAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
*}>
{if $field->isI18n()}
* @package WoltLabSuite\Core\System\Form\Builder\Field
* @since 5.2
*/
-class EmailFormField extends AbstractFormField implements IAutoCompleteFormField, IAutoFocusFormField, ICssClassFormField, II18nFormField, IImmutableFormField, IInputModeFormField, IPatternFormField, IPlaceholderFormField {
+class EmailFormField extends AbstractFormField implements IAttributeFormField, IAutoCompleteFormField, IAutoFocusFormField, ICssClassFormField, II18nFormField, IImmutableFormField, IInputModeFormField, IPatternFormField, IPlaceholderFormField {
+ use TAttributeFormField {
+ getReservedFieldAttributes as private defaultGetReservedFieldAttributes;
+ }
use TAutoCompleteFormField;
use TAutoFocusFormField;
use TCssClassFormField;
));
}
}
+
+ /**
+ * @inheritDoc
+ * @since 5.4
+ */
+ protected static function getReservedFieldAttributes(): array {
+ return array_merge(
+ static::defaultGetReservedFieldAttributes(),
+ [
+ 'maxlength',
+ ]
+ );
+ }
}