Forums

masking character "_" also included in database

chekwan 24 Sep, 2018
Hi,

I have a problem with data mask.

I have put the data mask format: data-inputmask:'mask': '99999999999'
means user can enter their phone number in 10 or 11 characters.

But when user enter 10 character, I will received the data input mask character "_" inside my database.

How can I exclude this character during submission.





healyhatman 24 Sep, 2018
Answer
1 Likes
Strip it out using PHP.
$this->data("nombor_telefon_bimbit3", preg_replace("/[^0-9]/", "", $this->data("nombor_telefon_bimbit3", "")), true);
chekwan 24 Sep, 2018
thanks for the reply..

this code I need to put inside the Submit event in Setup page right.?
healyhatman 24 Sep, 2018
1 Likes
Yes. And don't copy paste it type it out manually.
chekwan 24 Sep, 2018
Your solutions is working great!

thanks healyhatman 🤗🤗
This topic is locked and no more replies can be posted.