Viewing 4 replies - 1 through 4 (of 4 total)
  • The extra field has these settings you can use:

    Validation regex:
    /\d{3}-\d{3}-\d{4}/

    Regex fail message:
    Please type your phone number like this xxx-xxx-xxxx

    Like that?

    Thread Starter Shane Barnes

    (@slb923)

    Thanks a bunch for the rapid response, Mike. I’m gathering that the fail message appears upon form submission, correct?

    If all else fails I’ll go ahead and do that however I was wondering if it’s at all possible to implement something similar to this:

    https://www.kodyaz.com/content/howtoautoformattelephonenumber.aspx

    I’m not quite sure how to implement this functionality into the form, but I’d certainly like to, if at all possible so as to pre-empt the need for the Regex fail message. ??

    Yes the Regex fail message only appears if you submit the form without proper input that satisfies the regex.

    If you want to use the JavaScript from the site you found, you have to match the field name in the sample javascript code to the phone number field name on your form, then paste the code in your WP page after the shortcode.

    For this particular code sample, you also have to paste the flowing code into the extra field “attributes” setting:
    onkeydown="javascript:backspacerDOWN(this,event);" onkeyup="javascript:backspacerUP(this,event);”

    Thread Starter Shane Barnes

    (@slb923)

    Thanks a bunch, Mike! I’ll give that a try and see if it works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Fast Secure Contact Form] Input Mask for Telephone Numbers’ is closed to new replies.