WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Tanya
    Member
    Posted 2 years ago #

    Hi,

    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.

    Thanks.

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

  2. Tanya
    Member
    Posted 2 years ago #

    Don't worry, I purchased Gravity Forms.

  3. Mike Challis
    Member
    Plugin Author

    Posted 2 years ago #

    Yes this can be done with the Regex feature.

    http://www.fastsecurecontactform.com/how-to-add-extra-fields

    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.

    faq
    http://www.fastsecurecontactform.com/faq

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic