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.

conditional logic depending upon field being valid

  1. petitshoo
    Member

    Hi! I'm working on a form with a field that validates to a database on my server. The validation is working (hallelujah!) but now I'd like to use conditional logic to show the promotion the validation is linked to.

    Can conditional logic do this? If the input to the field is valid, then the promotion pops up?

    Posted 12 years ago on Saturday April 21, 2012 | Permalink
  2. It sounds like you can achieve this with our new Beta (official 1.6.4 release is wrapping up soon):

    Beta Release Notes:
    http://www.gravityhelp.com/gravity-forms-v1-6-4-beta-1-released/

    New Conditional Shortcode logic
    http://www.gravityhelp.com/documentation/page/Shortcodes#Conditional_Shortcode

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  3. petitshoo
    Member

    Okay, reading through that, I see how a static value can be used. Is there some way to make it know the field is valid after it's compared to a database? I'm using this to allow our users to use sale vouchers (from Plum District and this week from Groupon). I copy and pasted all 200 codes last week into the conditional logic so that when a user put in the correct code, the discount box would show. This week, it's 1000 Groupon codes and I'd really rather not have to copy and paste all of those.

    Ideally, this is what would happen. The Discount field will go to the database for validation (I have another topic open for this....I can only seem to use my code to validate one field and I need to validate two for two different offers). Then, once the field is confirmed valid, I'd like the conditional logic to tell it to show the discount offer that will then calculate into the shopping cart.

    Is this possible? Or do I need to start copying and pasting now?

    Thanks!

    Posted 11 years ago on Friday April 27, 2012 | Permalink