Tel Input
<salla-tel-input>
web component is used to show a field for entering a telephone number, with country key/code prefix, and that can be customized using the properties' parameters available.Example

Usage
HTML
JS
SASS
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
Country Code | country-code | Current country code | string | 'salla.config.get('user.country_code', 'SA')' |
Name | name | Input name value | string | `` |
Phone | phone | Current phone number | string | undefined |
Events
Event | Description | Type |
---|---|---|
phoneEntered | This event will be fired when the user enters the telephone input field | CustomEvent<Phone> |
Methods
methods
allow for calling functions built by Salla to carry out certain actvities, suh as getValues
to fetch the inputted values, and isValid
to determine whether or not the values are valid.Method | Description | Return Type |
---|---|---|
getValues() | Gets current inputted values | Promise<{[x: string]: string; countryCode: string; }> |
isValid() | Shows the validity of the current inputted values | Promise<boolean> |
Modified at 2024-08-18 09:26:07