Forums

Remove extra data-mask input

chekwan 27 Jan, 2017
Dear CF Team,

I have set the data-inputmask in my field for mobile phone number.

Extra Params: data-inputmask='mask' : '+601999999999'
Max Length: 12

But in my country have two (2) type length of digits (11 digits & 12 digits)

if the user put 11 digits number, my input mask have underscore "_" at last of the digit.
but the problems when user submit the form, underscore at the last digit also include in the number in the database & email.

eg. +0179093930_


How can I remove this underscore when user submit the email.?

If I need to put javascript, what are the coding of the script.? and where to put this script.?



thanks!
GreyHead 27 Jan, 2017
Answer
1 Likes
Hi Chekwan,

You can use [9] for an optional character - please see the 'Optional masks' section in the Mask docs here.

Bob
chekwan 29 Jan, 2017
Hi GreyHead

Seems I a little bit confused about the docs.. but when I see this post, Its working for me 😀
https://www.chronoengine.com/forums/posts/f5/t100685/mask-with-optional-numbers.html?hilit=Optional+masks


thanks a lot.. cheers!
This topic is locked and no more replies can be posted.