Conditional notifications for contest

I have a CPT for contest codes.
When people submit the right code in the form they win: forwarded to a congrats-page and they get a notification.
When the code is not a ‘winner’: only forwarded to a ‘try again’-page.

About the notifications; i’m trying it with gform_pre_send_email.
But i can’t find out how to get field values in there. Also an extra check on specific form is wanted.

What’s the best hook to achieve this all?
Any links to interesting snippets?

Thanks

You’re aware that when you have several confirmations (in this case that would be 2) you get a new field to make the confirmation conditional? (similar to the ‘only process this feed if…’-conditional field). Same goes for notifications.

From what I make of your description, that would be the perfect solution, without having to use extra snippets / plugins etc :slight_smile:

1 Like

Take a look at this article:

It’s easy to do exactly what you want using the built in conditional logic on confirmations. Please note: the Default confirmation won’t have conditional logic settings. Be sure your other two (or more) confirmations have conditional logic which covers all possible scenarios, and the Default will never be used. The Default is used only when a condition on the other confirmations is not met.

I don’t see this working with the out of the box conditionals cause it has to compare the person’s input with 500 contest codes that are defined in an extra custom post type. Even that code has a status (used or not-used); so extra feedback after submission on that is also wanted.

I tried a lot; yesterday 6h; today 9h.
Although i’m a Gravity Forms fan, in the end i found my solution in the hooks of another plugin Formidable. In the hooks that i needed; i was much clearer at the side of Formidable and for my range of development skills.

Thank you for the update. Let us know if you need anything else.

© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.