InputTel
API reference › HTML › Form › InputTel
Renders the HTML <input type="tel"> element for telephone number input.
The value uses the tel format (for example, ‘123-456-7890’).
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/tel.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$attributes protected | mixed[] | HTML attributes array used by the implementing class. Default: []. | UIAwesome\ |
$prefix protected | string | Prefix content string assigned to the element. Default: ''. | UIAwesome\ |
$prefixAttributes protected | array | HTML attributes array for the prefix element. Default: []. | UIAwesome\ |
$prefixTag protected | false|UnitEnum | Tag name for the prefix element, or false to disable. Default: false. | UIAwesome\ |
$suffix protected | string | Suffix content string assigned to the element. Default: ''. | UIAwesome\ |
$suffixAttributes protected | array | HTML attributes array for the suffix element. Default: []. | UIAwesome\ |
$suffixTag protected | false|UnitEnum | Tag name for the suffix element, or false to disable. Default: false. | UIAwesome\ |
$template protected | string | Template string used for constructing the HTML tag. Default: ''. | UIAwesome\ |
Methods
Section titled “Methods”Method details
Section titled “Method details”autocomplete()
Section titled “autocomplete() ”public function autocomplete(string|Stringable|UnitEnum|null $value): staticSets the autocomplete attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Autocomplete value, or null to remove the attribute. |
Returns
static: New instance with the updated autocomplete attribute.
list()
Section titled “list() ”public function list(string|Stringable|UnitEnum|null $value): staticSets the list attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Datalist ID, or null to remove the attribute. |
Returns
static: New instance with the updated list attribute.
readonly()
Section titled “readonly() ”public function readonly(bool|null $value): staticSets the readonly attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool| | Readonly state. Use true to make readonly, false to make editable, or null to remove the attribute. |
Returns
static: New instance with the updated readonly attribute.
required()
Section titled “required() ”public function required(bool|null $value): staticSets the required attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool| | Required state. Use true to require a value, false to make it optional, or null to remove the attribute. |
Returns
static: New instance with the updated required attribute.
getTag()
Section titled “getTag() ”protected function getTag(): UIAwesome\Html\Interop\VoidsReturns the tag enumeration for the <input> element.
Returns
Voids: Tag enumeration instance for <input>.
loadDefault()
Section titled “loadDefault() ”protected function loadDefault(): array<string, mixed>Returns the default configuration for the input element.
Returns
array<string, mixed>: Default configuration for the input element, including the default type attribute set to tel.
run()
Section titled “run() ”protected function run(): stringRenders the <input> element with its attributes.
Returns
string: Rendered HTML for the <input> element.