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.

Email with conditional text not working

  1. Dear anyone,

    I have created a form which asks one question (radio button): What do you want
    1. I have question
    2. I want a form

    If 1. is selected, the question field appears and the client can write his/her question.
    if 2. is selected, adress details show up.

    When the client submits the form I want the following:
    - a message. In stead of "Thanks for contacting us! We will get in touch with you shortly." I want to show either: thanks, you submitted the following question: the question.
    or: thanks, you have asked for the forms: you can download them on "http://domainname.xcom/forms

    I read about the conditional logic code on: http://www.gravityhelp.com/documentation/page/Shortcodes#Conditional_Shortcode

    but i cannot get it to work. I think it is because of the values. How to find them?

    Posted 11 years ago on Friday February 1, 2013 | Permalink
  2. You can use the conditional shortcode for this. To find the values, check the box "show values" and you will see the value of the radio button choices. You can simplify the values here by typing in "question" or "form" if you like. That's what you will use in your conditional merge tag.

    Posted 11 years ago on Monday February 4, 2013 | Permalink
  3. I have not described my question the right way.
    the "i have a question" form has only onw question:
    you select from dropdown the question and then you should go to the a certain page.

    I got the confirmation working a bit, in the confirmation after sending the form I have a conditional text, but can not get the action to go to a certain page to work. hope you get my problem. If not let me know.

    Posted 11 years ago on Monday February 4, 2013 | Permalink
  4. I understand your form has just one question.

    I guess there are three possibilities on what you want to do depending on their answer to the question:

    1. redirect them to one page or another based on their selection
    2. show them different text based on their selection
    3. send a different email confirmation based on their selection

    Which do you want to accomplish? We can help with any of them if we know more what you're trying to do exactly.

    You also mentioned drop down in your second reply, but radio button in your first request. Do you have an example of this form online somewhere where we can see it?

    Maybe this article which was written by our developer David Smith will help address your question? http://gravitywiz.com/2012/08/18/conditional-confirmations/

    Posted 11 years ago on Monday February 4, 2013 | Permalink
  5. I have a similar problem.

    I have a form with a set of three radio buttons. I assigned a value to each, but it doesn't look like the form is returning the selected value. When I put {all_fields} in the e-mail that gets sent to me, I see the label of the button selected, not the value, and if I try to use the value in the conditional statement in the notification, that conditional doesn't work. I have to use the label.

    What's up with that?

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  6. You stated "if I try to use the value in the conditional statement in the notification, that conditional doesn't work." The conditional statements can work like that. Can you post some screenshots of how you have the field values set up and then show us the conditional shortcode you were using?

    You can use one of the free image hosting services out there for your images(s) and then paste the links here.

    Posted 11 years ago on Saturday February 23, 2013 | Permalink
  7. The form is at http://danromanchik.com/form-test/.

    The form setup is at http://postimage.org/image/o5a31oufj/.

    The code I'm using for the notification is

    {all_fields}
    [gravityforms action="conditional" merge_tag="{Choose One:1}"condition="is" value="#1"]Your choice was #1.[/gravityforms]
    [gravityforms action="conditional" merge_tag="{Choose One:1}"condition="is" value="#2"]Your choice was #2.[/gravityforms]
    [gravityforms action="conditional" merge_tag="{Choose One:1}"condition="is" value="#3"]Your choice was #3.[/gravityforms]

    The notification message looks like this:

    Choose One
     	First Choice
    Name
     	dan
    Email
     	dan@danromanchik.com
    
    Oops! We could not locate your form.
    
    Oops! We could not locate your form.
    
    Oops! We could not locate your form.
    Posted 11 years ago on Monday February 25, 2013 | Permalink
  8. David Peralty

    Can you try to remove the all fields and use single quotes and see if it works properly then?

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  9. The only change that made was that I got, "Oops! We could not locate your form." twice instead of three times.

    I enabled user notification with the same notification text if you'd like to see this for yourself.

    Posted 11 years ago on Monday February 25, 2013 | Permalink
  10. Your notification text:

    [php]
    {all_fields}
    [gravityforms action="conditional" merge_tag="{Choose One:1}"condition="is" value="#1"]Your choice was #1.[/gravityforms]
    [gravityforms action="conditional" merge_tag="{Choose One:1}"condition="is" value="#2"]Your choice was #2.[/gravityforms]
    [gravityforms action="conditional" merge_tag="{Choose One:1}"condition="is" value="#3"]Your choice was #3.[/gravityforms]

    Is missing a space right before your "condition". Please note the difference in this version and try this instead:

    [php]
    {all_fields}
    [gravityforms action="conditional" merge_tag="{Choose One:1}" condition="is" value="#1"]Your choice was #1.[/gravityforms]
    [gravityforms action="conditional" merge_tag="{Choose One:1}" condition="is" value="#2"]Your choice was #2.[/gravityforms]
    [gravityforms action="conditional" merge_tag="{Choose One:1}" condition="is" value="#3"]Your choice was #3.[/gravityforms]
    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  11. Nope. That's not the problem. In fact, I think the lack of a space is the result of cutting and pasting the code here. There was always a space there.

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  12. Dan, if you like, please export this for as XML (Forms menu > Import/Export then the top center menu item, Export Forms) and email it to chris@rocketgenius.com and I will take a look at the configuration.

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  13. The issue is all the < code > tags in your notification. Take a look using the Text tab and you will see what I mean. Additionally, your conditional was testing for the value, but your merge tag would have been using the label. You have to use the :value in the merge tag if you want to compare the value rather than the label.

    Merge tag documentation: http://www.gravityhelp.com/documentation/page/Merge_Tags

    I emailed you the bad version (what you have currently) and the good version (with my modifications) of the notification. Switch to the Text mode (rather than Visual) and paste in the good one and please test again after saving. It worked in my tests.

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  14. Thanks. That fixed the problem.

    I did not type those statements into the notifications. I did copy and paste from the GravityForms documentation pages, though. That must have been how they got in there.

    Anyway, it's all good now.

    Posted 11 years ago on Wednesday February 27, 2013 | Permalink
  15. Thank you for the update.

    Posted 11 years ago on Monday March 4, 2013 | Permalink

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