HasValue
API reference › HTML Attribute › HasValue
Used by 20 types
UIAwesome\Html\Form\AbstractInputDateTimeUIAwesome\Html\Form\ButtonUIAwesome\Html\Form\InputCheckboxUIAwesome\Html\Form\InputColorUIAwesome\Html\Form\InputEmailUIAwesome\Html\Form\InputHiddenUIAwesome\Html\Form\InputNumberUIAwesome\Html\Form\InputPasswordUIAwesome\Html\Form\InputRadioUIAwesome\Html\Form\InputRangeUIAwesome\Html\Form\InputResetUIAwesome\Html\Form\InputSearchUIAwesome\Html\Form\InputSubmitUIAwesome\Html\Form\InputTelUIAwesome\Html\Form\InputTextUIAwesome\Html\Form\InputUrlUIAwesome\Html\Form\MeterUIAwesome\Html\Form\OptionUIAwesome\Html\Form\ProgressUIAwesome\Html\List\Li
Provides an immutable API for the value attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/value.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
value() | Sets the value attribute. | HasValue |
Method details
Section titled “Method details”value()
Section titled “value() ”public function value(bool|float|int|string|Stringable|UnitEnum|null $value): staticSets the value attribute.
Defines the current value for the element.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool|Stringable|UnitEnum| | Element value as bool, int, float, string, Stringable, UnitEnum, or null to remove the attribute. |
Returns
static: New instance with the updated value attribute.