Support » Plugin: Conditional Fields for Contact Form 7 » Customizing the email message only, based on drop down selection

  • Hello Jules,

    I realize it’s not a great time to be looking for support… what with New Year’s Eve just around the corner but the site I’m working on needs to launch first thing in 2019 so I’m reaching out anyways.

    I’ve been reading through previous forum topics and the tutorial and I’m just not understanding how to use a conditional group to just customize the autoresponder message body.

    If the user selects “subscribe” in the dropdown the autoresponder they receive will show “text 1” and if the user selects “unsubscribe” the autoresponder message body will show “text 2”.

    I realize this is probably very simple, but I’m just not sure how to go about it. Your help would be greatly appreciated.

    Thank you,
    Rossitza

    Here is my form:

    [text* first placeholder “First Name”]
    [text* last placeholder “Last Name”]
    [email* email placeholder “Email Address”]
    [select* sub-unsub “I would like to receive news from Musique et Compagnie” “I no longer wish to receive the Musique & Compagnie newsletter”]
    [submit “Submit”]

    and this is the autoresponder:

    Hello [first][last],

    text 1
    We have received your subscription to our newsletter.
    Keep an eye on your inbox for news from Musique et Compagnie.

    text 2
    You have unsubscribed from the Musique & Compagnie newsletter.
    Give us a few days to update our files.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    OK, first you need to add 2 empty groups to your form:

    [group text-1][/group][group text-2][/group]

    Then add this condition:

    show text-1 if sub-unsub equals "I would like to receive news from Musique et Compagnie"
    and
    show text-2 if sub-unsub equals "I no longer wish to receive the Musique & Compagnie newsletter"

    Then finally update your email like this:

    Hello [first][last],
    
    [text-1]We have received your subscription to our newsletter.
    Keep an eye on your inbox for news from Musique et Compagnie.[/text-1][text-2]You have unsubscribed from the Musique & Compagnie newsletter.
    Give us a few days to update our files.[/text-2]

    Thanks for getting back tome so quickly!

    Unfortunately, I’m not doing something right because the message body doesn’t display either text…

    After I add the two conditional rules and save, the values for text-1 and text-2 are no longer visible. Is that normal?

    Am I supposed to use the import/export for this?

    Here is the link to the page where the form is, since it’s changed: http://musiqueetcompagnie.com/

    Plugin Author Jules Colle

    (@jules-colle)

    Could you try and add a dot in the groups: [group text-1].[/group][group text-2].[/group]

    I’m not sure, but it’s possible that it’s not working because the groups are empty. Could you check if this solves anything?

    Hello Jules,

    Happy New Year! Thanks for your help.
    Adding the period doesn’t make a difference. Any other ideas?

    Hello Jules,

    the issue turned out to be the way I was entering the value.
    I was using quotation marks, so every time I saved the contact form, the values I had entered in the fields would disapppear.

    "I would like to receive news from Musique et Compagnie"
    and
    "I no longer wish to receive the Musique & Compagnie newsletter"

    Instead, I removed the quotation marks and the autoresponder now works beautifully. When I save the form, the values are retained. I also removed the dot in the groups as well, since it wasn’t needed anymore.

    Thank you for your help!

    Plugin Author Jules Colle

    (@jules-colle)

    You’re welcome. Feel free to leave a review.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.