Name
tel
Type
input
Synopsis
How to render a telephone number input field
Description
<input>
elements of type tel are used to let the user enter and edit a telephone number. Unlike <<input type="email">
and <<input type="url">
, the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world.
Parameters
input type="tel"
As of version 1.1.37 there is an optional field you can use called calc. It allows you to do calculations with other input field of type="number". The calc argument can hold a calculation and the other fields you want to use access them by there name field between square brackets. Like so : "5*[field1]+(20/[field2]". See the second example. Currently for this to work, the number field with the calc argument must be in the same Form.
Example
<form action="get" restrictions="lifted">
<label for="call-me">Enter your phone number (Dutch format: +31 123456789 )</label>
<br>
<input type="tel" id="call-me" name="phone" pattern="(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)" value="+31 123456789" />
</form>
Note
Links
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel