Forums

Contact Form 7
Validating Input As Numbers (4 posts)

  1. oren00
    Member
    Posted 11 months ago #

    Hi there,

    Excellent plug-in!

    I'd like to create a field for capturing phone numbers and I'd like to restrict/validate the input as numbers for this field. I am currently not finding a method to implement this.

    Thanks in advance for your help with this matter,
    Oren

    http://wordpress.org/extend/plugins/contact-form-7/

  2. epimazzo
    Member
    Posted 11 months ago #

    Hi,

    I'm on the same boat! Need to input numbers and can't figure out how and which tag I have to use. Please help us! :-)

    thanks

  3. biswajeet
    Member
    Posted 11 months ago #

    Hi, at present CF7 doesn't support number/PH no# field validation out of the box. You need to modify the code and write your own validation regex.

    After you modified, you can see something like this

    However number field should be included with basic validation and may provide validation regex input field for the user as per requirement.

    thanks!

  4. epimazzo
    Member
    Posted 11 months ago #

    Hi biswajeeT!

    Thanks for clarify. Is there any file I can edit to generate such regex? Confess not being driving this very well. So, any tip would be really appreciated.

    Thanks a lot.

    Cheers

Reply

You must log in to post.

About this Plugin

About this Topic