HasName
API reference › HTML Attribute › HasName
Used by 10 types
UIAwesome\Html\Core\Element\BaseInputUIAwesome\Html\Form\AbstractChoiceListUIAwesome\Html\Form\ButtonUIAwesome\Html\Form\FieldsetUIAwesome\Html\Form\FormUIAwesome\Html\Form\OutputUIAwesome\Html\Form\SelectUIAwesome\Html\Form\TextAreaUIAwesome\Html\Interactive\DetailsUIAwesome\Html\Metadata\Meta
Provides an immutable API for the name attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/name.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
name() | Sets the name attribute. | HasName |
Method details
Section titled “Method details”name()
Section titled “name() ”public function name(string|Stringable|UnitEnum|null $value): staticSets the name attribute.
Defines the metadata name or form control name.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Name value, or null to remove the attribute. |
Returns
static: New instance with the updated name attribute. MetaName for predefined enum values.