Page 1 of 1

Phone number field

Posted: Mon Jan 08, 2018 2:43 am
by sagmag

Is there away to setup a field to receive phone number?


Re: Phone number field

Posted: Mon Jan 08, 2018 5:23 am
by sangnandar

What's the trouble?
Phone number is just an INT datatype, right?
Please explain more.


Re: Phone number field

Posted: Mon Jan 08, 2018 1:48 pm
by arbei

Use text field and use "Regular Expression" as validation in order to make sure the Phone number is in your expected format.


Re: Phone number field

Posted: Wed Jan 10, 2018 5:26 am
by sagmag

But where and how will I put the regex so that the validation can be done on client and server. If there is an error on client the red color on the edges of the fields must be shown?


Re: Phone number field

Posted: Wed Jan 10, 2018 11:36 am
by arbei

sagmag wrote:
But where and how will I put the regex so that the validation can be done
on client and server. If there is an error on client the red color on the
edges of the fields must be shown?

  1. Enable the option "Client-side (JavaScript)" in [PHP] -> [General Options] -> [Validation].
  2. Set up [Edit Tag] of the field as "Text".
  3. In [Edit Tag] -> [Validation] -> [Validate] as "Regular Expression".
  4. Enter your expression in [Argument (client side)].
  5. Enter your error message.

You can also use [Client Script] -> [Form_CustomValidate] of the Edit Page or Add Page to validate the field.
Read help file topic: "Server Events and Client Scripts" -> "Client Scripts" -> "Form_CustomValidate" for more information.