phone number field automatically removes leading zero

phone number field automatically removes leading zero

  

Hi,


I have the following issue:

I have a custom mask on a field.

The field is a phone number field.

However the mask only works on fields of input text.

This means that on mobile devices the numers pad does not show up automatically since the device thinks it is a text field.

Setting the field to number without the mask ( I can create a mask with jQuery myself later) gives the following behaviour:

The length is set to ten. the user types in 06123456789 (11 digits) then the leading zero is removed and the field shows: 6123456789.


How can I have a normal numbers field where a user can fill in a phonenumber via the numbers keypad.

Solution

Hello Edwin,

If you are doing an WEB application, you can add to the input in the Extended Properties section, the property Type, with the value "tel".

This will bring the numerical pad when you focus on it. 

At least on my Android it works (I don't know if it works on other devices)

But I don't know how this will play with the Custom Masks, but probably there will be no problems. You can try it.
If it is a mobile app, you can select the type to Tel in the properties of the input.

Hope this helps.

Cheers
Eduardo Jauch

Solution

Great! this works.

Bit strange though that the property of the field for type is text and that I have to set a property of type with a value of 'tel' to make it work. One overrules the other... Thanks for your help

Edwin Vriesman wrote:

Great! this works.

Bit strange though that the property of the field for type is text and that I have to set a property of type with a value of 'tel' to make it work. One overrules the other... Thanks for your help

Glad it worked :)

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Hello Edwin,

If you are doing an WEB application, you can add to the input in the Extended Properties section, the property Type, with the value "tel".

This will bring the numerical pad when you focus on it. 

At least on my Android it works (I don't know if it works on other devices)

But I don't know how this will play with the Custom Masks, but probably there will be no problems. You can try it.
If it is a mobile app, you can select the type to Tel in the properties of the input.

Hope this helps.

Cheers
Eduardo Jauch


What is this type tel?

Im facing problems with mask number, i am using input mask mobile for number in my mobile aplication, the problem is, i write on the input example: 22,00 then on the db he saves as 22 and when i get back to the page the input receives the 22 and the input stays 0,22... Another example its me putting 2,20 and when he gets back stays 0,22 too...

Its urgent, waiting, appreciate!