{include file='__formFieldHeader'}

<input type="text" {*
	*}id="{@$field->getPrefixedId()}" {*
	*}name="{@$field->getPrefixedId()}" {*
	*}value="{if $field->allowsMultiple()}{if $field->getValue()|is_array}{implode from=$field->getValue() item=username}{$username}{/implode}{/if}{else}{$field->getValue()}{/if}" {*
	*}class="long"{*
	*}{if $field->isAutofocused()} autofocus{/if}{*
	*}{if $field->isRequired()} required{/if}{*
	*}{if $field->isImmutable()} disabled{/if}{*
*}>

<script data-relocate="true">
	require(['WoltLabSuite/Core/Ui/ItemList/User'], function(UiItemListUser) {
		UiItemListUser.init('{@$field->getPrefixedId()}', {
			{if $field->getMaximumMultiples() !== -1}
				maxItems: {@$field->getMaximumMultiples()}
			{/if}
		});
	});
</script>

{include file='__formFieldFooter'}

{include file='__formFieldHeader'}

<input type="text" {*
	*}id="{@$field->getPrefixedId()}" {*
	*}name="{@$field->getPrefixedId()}" {*
	*}value="{if $field->allowsMultiple()}{if $field->getValue()|is_array}{implode from=$field->getValue() item=username}{$username}{/implode}{/if}{else}{$field->getValue()}{/if}" {*
	*}class="long"{*
	*}{if $field->isAutofocused()} autofocus{/if}{*
	*}{if $field->isImmutable()} disabled{/if}{*
*}>

<script data-relocate="true">
	require(['WoltLabSuite/Core/Ui/ItemList/User'], function(UiItemListUser) {
		UiItemListUser.init('{@$field->getPrefixedId()}', {
			{if $field->getMaximumMultiples() !== -1}
				maxItems: {@$field->getMaximumMultiples()}
			{/if}
		});
	});
</script>

{include file='__formFieldFooter'}

Remove `required` attribute for user form field
Remove `required` attribute for user form field

The `required` attribute does not work as expected here as the input field to enter a username should be empty because the entered values are stored in the `ol.inputItemList` element.

See #2509
