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.

Excluding keywords for field population

  1. Is there a way in the form to enter a couple keywords that exclude the user from filling in that certain keyword that's excluded? Say I ask a question in the form that states: Where did you hear about us? And they type in, "internet". Is there a way to stop that keyword from being entered? Or if not, any future thought on implementing this?

    Posted 10 years ago on Tuesday May 24, 2011 | Permalink
  2. So you want to prevent a user from typing in a specific value in a field and display an error telling them they can't use that value if they do?

    If so, what you want to do is custom validation. There is an API hook called gform_validation that you can use to write your own custom validation for a field. You can find documentation for this hook here:

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

    There is also a tutorial on how to write custom validation in a tutorial here:

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

    We can't take into account all kinds of custom use validation which is why we have a hook that allows developers to write their own custom validation for custom use cases.

    Posted 10 years ago on Tuesday May 24, 2011 | Permalink
  3. Thanks Carl, that's exactly what I was looking for.

    Posted 10 years ago on Tuesday May 24, 2011 | Permalink

This topic has been resolved and has been closed to new replies.