Fast Secure Contact Form
[resolved] Set Field type as number (3 posts)

  1. Tanya
    Posted 4 years ago #


    I would like to know if it possible to set the field type as a number between 0 and 100.

    For example, if the person was to put in a winning margin in a basketball game, I would like them to be able to type 12 into the field. I would like an error to pop up if they happen to put in text or a number below 0/above 100.



  2. Tanya
    Posted 4 years ago #

    Don't worry, I purchased Gravity Forms.

  3. Mike Challis
    Plugin Author

    Posted 4 years ago #

    Yes this can be done with the Regex feature.


    Validation regex:
    Use to validate if form input is in a specific format. Example: If you want numbers in a text field type but do not allow text, use this regex: /^\d+$/ Can be used for text, textarea, date and password field types.

    Regex fail message:
    Use to customize a message to alert the user when the form fails to validate a regex after post. Example: Please only enter numbers. For use with validation regex only.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Fast Secure Contact Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic