PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Field Validation

  1. Creating an eccomerce site for a client. They have 2 products which can only be purchased by people who have attended their training classes. When they attend, they are given a paper with a VERY generic serial number... lets say ABC-12345678. Ive used an input mask to hide the cart66 add to cart button, so that someone has to enter at least ABC-12 and then the cart button appears. This doesn't have to be secure, just enough to hassle people who don't have a real serial number.
    My question is, is there a way to validate the first 3 to 5 characters in the serial... So that someone must input ABC-12345678 and something like DEF-98765432 will not work?

    Posted 10 years ago on Monday April 16, 2012 | Permalink
  2. For the time being I just set conditional logic on the submit button, to "Starts with... ABC-12" Not sure if there's any other "cooler" options?

    Posted 10 years ago on Monday April 16, 2012 | Permalink
  3. You could try using this hook for custom validation:

    http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook

    However, your work around would work too.

    Posted 10 years ago on Monday April 16, 2012 | Permalink
  4. Thanks!

    Posted 10 years ago on Monday April 16, 2012 | Permalink
  5. No problem, glad to help.

    Posted 10 years ago on Tuesday April 17, 2012 | Permalink