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.

Check field input against list of numbers?

  1. We have an old database of customer numbers that we're trying to steer away from. However, these customers are people who have paid for a membership in the past, and we are still honoring those. So my question is this:

    We want to create a form with a checkbox that asks whether or not they have a current membership. If they select "yes" it will trigger a field that requires them to enter their customer number. Is there a way for us to take the complete list of those customer numbers and have the entered value check that list to make sure the number is valid? If it is valid, it will display a green checkmark (or something similar). If it is NOT a valid number, it will display a message to that effect.

    Can GF handle this?

    Posted 12 years ago on Wednesday October 31, 2012 | Permalink
  2. David Peralty

    We don't have a built-in way to do this. You would have to program something to have this effect within a Gravity Form using AJAX.

    So something like a table in your database with valid numbers, then a field in Gravity Forms where JS is applied and on change, it checks your table and returns a valid/invalid. Adding in a PHP validation using our validation hook.

    http://www.gravityhelp.com/documentation/page/Gform_field_validation

    Hope that helps.

    Posted 12 years ago on Wednesday October 31, 2012 | Permalink
  3. Do you know how to do that? I'm not experienced in that at all...

    Posted 12 years ago on Wednesday October 31, 2012 | Permalink
  4. David Peralty

    Sounds like the perfect kind of task to hire a developer to handle for you. We have a Job Board section here on this forum ( http://www.gravityhelp.com/forums/forum/job-board ) and recommend sites like http://jobs.wordpress.net and other freelance coding sites.

    Posted 12 years ago on Wednesday October 31, 2012 | Permalink
  5. Could it not somehow be accomplished using the "gform validation" hook?

    Posted 12 years ago on Thursday November 1, 2012 | Permalink
  6. I would think that coding it so only certain values (in this case, customer numbers) are valid would be a way to accomplish this. No?

    Posted 12 years ago on Friday November 2, 2012 | Permalink