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.

Automatic notification if multiple 'No' radio buttons selected

  1. jonathaninch
    Member

    Hi -

    We need to do an online survey involving a series of 20-30 Yes/No questions using radio buttons.

    What we'd like to do is have a condition that says: "if the survey user clicks 'No' for all of the answers, we want to send a certain email automatically. If they don't click all 'No's then we send out a dirrerent email"

    Is this possible?

    Posted 12 years ago on Thursday November 8, 2012 | Permalink
  2. jonathaninch
    Member

    I've since noticed that we have conditional shortcodes available which can trigger an automatic email:
    http://www.gravityhelp.com/documentation/page/Shortcodes#Conditional_Shortcode

    However, the examples shown only relate to one condition being met. Can the logic be extended to cover multiple AND conditions being met e.g. if radio1 = NO and radio2 = NO and radio3 = NO....etc?

    Posted 12 years ago on Thursday November 8, 2012 | Permalink
  3. Conditional shortcodes cannot be combined or nested like that. However, you can use some php code to do the same thing in your theme's functions.php using the gform_pre_submission_filter. You can change the user notification based on the answers they give to your questions.

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

    Posted 12 years ago on Friday November 9, 2012 | Permalink
  4. Many thanks, Chris.

    Sorry for my stupidity but I'm not a programmer and the example in the documentation doesn't quite fit what I'm doing.

    The example is saying "if there's an email address is input_9 then add it to BCC..." etc

    I need to say "if radio1 is NO and radio2 is NO and......radio20 is NO then use this content for the notification message, otherwise use this alternative content".

    Is it possible you could show me the php syntax I'd need? Really appreciate your help!

    Posted 12 years ago on Friday November 9, 2012 | Permalink
  5. Lee, we can help you with the syntax in the regular support forums, not the pre-purchase forum. Once you've purchased a license, go ahead and create a new topic and we'll help you there.

    Posted 12 years ago on Monday November 12, 2012 | Permalink

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