• Resolved jstead

    (@jstead)


    Is it possible to have a conditional to: field based on user selection? For instance in our use case, the choices are sales or support?

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

    (@jules-colle)

    yep, it will be available in the next release.

    What is your exact use case? Because what you want might be available in CF7 already, using pipes. See: https://contactform7.com/selectable-recipient-with-pipes/

    Thread Starter jstead

    (@jstead)

    Great, thank you for the prompt reply.

    That pipes method will defiantly be useful in what we are looking to do… but might need to manually do the conditional using 4 separate forms, as the full use-case is conditional groups within a conditional group.

    users 1st selects from 4 departments…. but then in 1 department there are 3 regions to choose from. So, there are 6 end recipients.

    department1 – {form > [email protected]}

    department2 – region1 – {form > [email protected]}
    – region2 – {form > [email protected]}
    – region3 – {form > [email protected]}

    department3 – {form > [email protected]}

    department4 – {form > [email protected]}

    Will the update use the [group] as separation for the To: field and be able to work with a nested conditionals setup?

    Plugin Author Jules Colle

    (@jules-colle)

    Ah ok. That’s an interesting case. @stevish contributed some code on github for conditions in all email fields, but I haven’t tested it yet. I’ll let you know when I did.

    I’m not sure on the timing yet, so if you’re feeling adventurous, you could test it yourself by implementing the folowing pull request https://github.com/pwkip/contact-form-7-conditional-fields/pull/6/files and let me know if it works for you

    Thread Starter jstead

    (@jstead)

    Hi Jules,

    Did some tests, and looks to work really well. Couldn’t break it. Setup exactly as above use case and tested to, From, Subject and Additional Headers fields.

    Only issue, wasn’t even to do with the conditionals itself, but CF7 in general, and the Contact Form DB plugin I use to store entries.
    The fact that all ‘consistent’ fields among conditional sections have to be unique. Means have [name1] – [name6], [subject1] – [subject6] etc, which bloats out the Database

    Don’t wonder there is a way of being able to use the same form ID in multiple conditional sections?
    at the moment, it pulls the data from the last “entry” of a specific ID.

    Plugin Author Jules Colle

    (@jules-colle)

    well. i’m afraid there is nothing we can do about that. it’s not just cf7 that disallows duplicate field names. but this is actually an html standard. no 2 fields in an html form can have the same name because the server would not know which is which. i agree there could be a workaround if you prepend all field names with the group id they belong to. but frankly i believe this is asking for compatibility problems with other plugins that extend cf7.

    Ehm i’m not quite sure if my problem is the same because i don’t have the condition in a condition.

    I’ve tried this:

    
    <p>W?hle deinen Ansprechpartner
    [select* your-recipient "KNRD Fest booking|[email protected]"
                        "KNRD Gigs booking|[email protected]"
                        "Press|[email protected]"
                        "Allgemein|[email protected]"]
     </p>
    [group probe]
    
    <p>H?rprobe
    [url Hoerprobe placeholder "Type Link - for example: https://bandcamp..."]
    </p>
    
    [/group]
    

    Now when I place the form in the visual editor I already see, that “[/group]” is being shown as code – but i shouldn’t be seeing any code there wich tells me that something is going wrong here.

    So as i already assumed, the condition also isn’t working, when i save and look at the real page.

    Could you help me here?

    Thx in advance,
    Phil

    Plugin Author Jules Colle

    (@jules-colle)

    @philtone are you still having problems with this after the update? If so, please create a new support thread for this, as I won’t be monitoring this one.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Conditional To: Field’ is closed to new replies.