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 shortcode

  1. Scopika
    Member

    Hi, this addon is great!

    I tried to use conditional shortcodes to display messages depending on the quizz results :

    [gravityforms action="conditional" merge_tag="{quiz_percent}" condition="greater_than" value="99"]
    You rock
    [/gravityforms]
    
    [gravityforms action="conditional" merge_tag="{quiz_percent}" condition="less_than" value="10"]
    Hum!
    [/gravityforms]
    
    .... other custom text here...

    Unfortunately, none of the shortcodes above is displayed. Are the quiz-related merge tags available in shortocdes ?

    Regards,

    Posted 11 years ago on Wednesday December 19, 2012 | Permalink
  2. Where are you trying to use the conditional? In the Form Confirmation?

    I just tested the conditional shortcode on one of my test forms using the Quiz Fields and was able to get it to work without any issues using the {quiz_percent} merge tag.

    I actually copied and pasted what you have above and used it exactly is. See this screenshot:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-12-19%20at%2012.27.10%20PM.png

    Here is what is displayed when I submit the form in preview:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-12-19%20at%2012.28.07%20PM.png

    You'll see the "You Rock" appears as I have configured using the conditional shortcode as I scored 100% on the Quiz.

    Here's another screenshot showing what happens when I get 0% correct. It triggered the "less_than 10" conditional shortcode in my Form Confirmation that says "Hum!":

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-12-19%20at%2012.28.50%20PM.png

    I'm not able to replicate any issues with the conditional shortcode using it in the Form Confirmation the way you have described.

    Posted 11 years ago on Wednesday December 19, 2012 | Permalink