• Resolved R.J. Landsdown

    (@rj-landsdown)


    We’ve created quite a few conditional fields – somewhere around 40.
    Everything works on the form itself, except when it comes to the mail.

    We have it set up like so:

    Type of feedback – general or specific
    if Specific – show country dropdown
    Choose a country – let’s say US – show states
    Choose state – show exact store location dropdown
    Choose store

    All of this works and displays in the mail, except the store that’s been chosen.
    All store groups have the same value of Location – could this be an issue and they all need unique values?

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

    (@jules-colle)

    yep, all you field names need to be unique. Sorry about that.

    See: https://conditional-fields-cf7.bdwm.be/docs/troubleshooting/all-field-names-should-be-unique/

    Thread Starter R.J. Landsdown

    (@rj-landsdown)

    Thanks! I worked it out so it’s pulling in now, but I’ve got A LOT of excess I don’t need to see. Even after clicking the “exclude blank mail-tags…” option, I am seeing ALL of the groups in the mail. But only the one that was selected says anything other than “Select Your Location”

    Anyway to remove these un-selected options?

    Plugin Author Jules Colle

    (@jules-colle)

    You could use conditional tags in the email as well. For example this email code:

    [group123]The value of my field was: [my-field][/group123]

    Will only output the text The value of my field was: The value I filled in if [group group123] was visible during submit.

    I realize it would be a lot of manual work to create all these conditions line by line, that’s why I have written a tool that you might find helpful: https://bdwm.be/cf7-tools/cf7-to-mail-body.php

    • This reply was modified 6 years, 7 months ago by Jules Colle.
    Thread Starter R.J. Landsdown

    (@rj-landsdown)

    So for example, I could do this in the Mail:

    ....
    ....
    Store: 
    [group-state1]
    [Location1]
    [/group-state1]
    repeat repeat

    In order to display which one was chosen across all options, and leaving out anything that’s not?

    Plugin Author Jules Colle

    (@jules-colle)

    No I don’t think so. Could you show me your form?

    Plugin Author Jules Colle

    (@jules-colle)

    Or, if your form is not too large you can use this other crappy tool I’ve written to input your form and send me the link: https://conditional-fields-cf7.bdwm.be/form-tester/

    Thread Starter R.J. Landsdown

    (@rj-landsdown)

    Would email be alright? This isn’t my form or site so I’m hesitant to share it publicly.

    Thread Starter R.J. Landsdown

    (@rj-landsdown)

    I also can’t use the tool. The form is too large and I get a 414 error code.

    Plugin Author Jules Colle

    (@jules-colle)

    I don’t offer one on one support for the free plugin. Can you make the form smaller just so I can explain the concept?

    Thread Starter R.J. Landsdown

    (@rj-landsdown)

    Store: 
    [group-alabama]
    [Location1]
    [/group-alabama]
    
    [group-arkansas]
    [Location2]
    [/group-arkansas]
    
    [group-arizona]
    [Location3]
    [/group-arizona]
    
    etc etc all the way to Location40
    

    This works inside of Mail to ONLY show the location selected. However, there is A LOT of blank space surrounding the selected location.

    Plugin Author Jules Colle

    (@jules-colle)

    try to write it like this:

    Store: 
    [group-alabama]
    [Location1]
    [/group-alabama][group-arkansas]
    [Location2]
    [/group-arkansas][group-arizona]
    [Location3]
    [/group-arizona]
    
    etc etc all the way to Location40
    Thread Starter R.J. Landsdown

    (@rj-landsdown)

    Really appreciate all your help! I’ve made a donation to this awesome plugin and developer.

    Plugin Author Jules Colle

    (@jules-colle)

    thanks! 🙂

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Conditional Fields Not Displaying in Mail’ is closed to new replies.