Support » Plugin: Conditional Fields for Contact Form 7 » Piped Values Seems to not work

  • Resolved Darryl.R

    (@darrylr)


    Thanks for an awesome plugin!

    I’ve been building a contact form that sends the query to a specific department contact email based on the region that the user has selected.

    1. They select their province or country;

    2. Then it loads a select box with a bunch of values that each have an associated email address (seperated by a pipe character) as the recipient. Please see below link on for more detail on this (if you are not aware already)

    https://contactform7.com/selectable-recipient-with-pipes/

    Everything seems to be in order, and the form works on the front end, (and says sent successfully) but the selected recipient seems to not be working?

    Thank you!

    • This topic was modified 6 months ago by  Darryl.R.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    pipes are working. Can you give an example that proofs it’s not working?

    Darryl.R

    (@darrylr)

    Hi Jules

    I’m not saying anything is broken, but perhaps I’m missing something? Please check the below details:

    The proof is that the recipient [your-recipient] is not getting the emails, but the regular recipients which are (my.email@mydomain.com & my.email2@mydomain.com) are definitely getting the mail.
    ====================================================================================

    Form: </form>

    <p>Your Name (required)<br />
        [text* your-name] </p>
    
    <p>Your Email (required)<br />
        [email* your-email] </p>
    
    <p><b>Your Region (required)</b><br />
        [select* province include_blank "Gauteng (South Africa)" "KwaZulu-Natal (South Africa)" "Limpopo (South Africa)" "Mpumalanga (South Africa)" "North West (South Africa)" "The Eastern Cape (South Africa)" "The Free State (South Africa)" "The Northern Cape (South Africa)" "The Western Cape (South Africa)" "Namibia" "Botswana" "Zimbabwe" "Mozambique" "Swaziland" "Lesotho" "Other"] </p>
    
    [group Gauteng]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|nicola@mydomain.com"
    "I can't find the product I'm looking for|camilla@mydomain.com"
    "I would like to get a quote on a custom branded product|camilla@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com" ]
    </p>	
    [/group]
    
    [group KwaZulu-Natal]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|tanja@mydomain.com"
    "I can't find the product I'm looking for|nicola@mydomain.com"
    "I would like to get a quote on a custom branded product|tanja@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Limpopo]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|boipelo@mydomain.com"
    "I can't find the product I'm looking for|boipelo@mydomain.com"
    "I would like to get a quote on a custom branded product|nicola@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Mpumalanga]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|camilla@mydomain.com"
    "I can't find the product I'm looking for|camilla@mydomain.com"
    "I would like to get a quote on a custom branded product|camilla@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group North-West]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|boipelo@mydomain.com"
    "I can't find the product I'm looking for|boipelo@mydomain.com"
    "I would like to get a quote on a custom branded product|boipelo@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group The-Eastern-Cape]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|saajidah@mydomain.com, marilyn@mydomain.com"
    "I have a question about a product|kelly@mydomain.com"
    "I can't find the product I'm looking for|kelly@mydomain.com"
    "I would like to get a quote on a custom branded product|kelly@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group The-Free-State]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|boipelo@mydomain.com"
    "I can't find the product I'm looking for|boipelo@mydomain.com"
    "I would like to get a quote on a custom branded product|boipelo@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group The-Northern-Cape]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|saajidah@mydomain.com, marilyn@mydomain.com"
    "I have a question about a product|kelly@mydomain.com"
    "I can't find the product I'm looking for|kelly@mydomain.com"
    "I would like to get a quote on a custom branded product|kelly@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group The-Western-Cape]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|saajidah@mydomain.com, marilyn@mydomain.com"
    "I have a question about a product|kathryn@mydomain.com"
    "I can't find the product I'm looking for|kathryn@mydomain.com"
    "I would like to get a quote on a custom branded product|kathryn@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com" ]
    </p>	
    [/group]
    
    [group Namibia]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|kelly@mydomain.com"
    "I can't find the product I'm looking for|kelly@mydomain.com"
    "I would like to get a quote on a custom branded product|kelly@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Botswana]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|sean@mydomain.com"
    "I can't find the product I'm looking for|sean@mydomain.com"
    "I would like to get a quote on a custom branded product|sean@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Zimbabwe]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|boipelo@mydomain.com"
    "I can't find the product I'm looking for|boipelo@mydomain.com"
    "I would like to get a quote on a custom branded product|boipelo@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Mozambique]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|camilla@mydomain.com"
    "I can't find the product I'm looking for|camilla@mydomain.com"
    "I would like to get a quote on a custom branded product|camilla@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Swaziland]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I can't find the product I'm looking for|camilla@mydomain.com"
    "I would like to get a quote on a custom branded product|camilla@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Lesotho]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|lynn@mydomain.com, chevonne@mydomain.com, kerry@mydomain.com, nikki@mydomain.com"
    "I have a question about a product|boipelo@mydomain.com"
    "I can't find the product I'm looking for|boipelo@mydomain.com"
    "I would like to get a quote on a custom branded product|boipelo@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    [group Other]
    <p><b>Department (required)</b><br />
    [select* your-recipient include_blank 
    "I have a question about an order I've placed|laura@mydomain.com"
    "I have a question about a product|sean@mydomain.com"
    "I can't find the product I'm looking for|sean@mydomain.com"
    "I would like to get a quote on a custom branded product|sean@mydomain.com"
    "I have a query about my account|chantal@mydomian.com, michelle@mydomain.com"
    "I need documents relating to my purchase history|chantal@mydomian.com, michelle@mydomain.com"
    "I have problems logging into the website|darryl@mydomain.com, nicola@mydomain.com"
    "I want to report a website bug|darryl@mydomain.com, nicola@mydomain.com"]
    </p>	
    [/group]
    
    <p>Please describe your query in detail<br />
        [textarea your-message] </p>
    
    <p>[submit "Send"]</p>

    =================================================================================
    Mail

    To field:

    [your-recipient], my.email@mydomain.com, my.email2@mydomain.com

    Message Body:

    From: [your-name] [your-email]
    Subject: Ad Hoc Request
    
    <b>Province:</b> [_raw_province] <-- If this is not your area of responsibility, please pass on to correct Rep.<br/>
    <b>Selected Rep:</b> [province] <-- This determines who responds<br/>
    
    <b>From:</b><br />
    [your-name] : [your-email] from [your-business], [contact]
    
    <b>Products of Interest</b><br />
    [item-code]
    
    <b>Quantity per item</b><br />
    [quantity]
    
    <b>Brand Name</b><br />
    [brand]
    
    <b>Notes:</b><br />
    [your-message]

    ==================================================================================
    Conditional Fields

    if [province] equals "Namibia" then show [Namibia]
    if [province] equals "Botswana" then show [Botswana]
    if [province] equals "Zimbabwe" then show [Zimbabwe]
    if [province] equals "Mozambique" then show [Mozambique]
    if [province] equals "Swaziland" then show [Swaziland]
    if [province] equals "Lesotho" then show [Lesotho]
    if [province] equals "Other" then show [Other]
    if [province] equals "The Northern Cape (South Africa)" then show [The-Northern-Cape]
    if [province] equals "KwaZulu-Natal (South Africa)" then show [KwaZulu-Natal]
    if [province] equals "Limpopo (South Africa)" then show [Limpopo]
    if [province] equals "Mpumalanga (South Africa)" then show [Mpumalanga]
    if [province] equals "North West (South Africa)" then show [North-West]
    if [province] equals "The Eastern Cape (South Africa)" then show [The-Eastern-Cape]
    if [province] equals "The Free State (South Africa)" then show [The-Free-State]
    if [province] equals "Gauteng (South Africa)" then show [Gauteng]
    if [province] equals "The Western Cape (South Africa)" then show [The-Western-Cape]
    Plugin Author Jules Colle

    (@jules-colle)

    you cannot have multiple field values with the same name in in one form. Please rename all your your-recipient names to your-recipient-1, your-recipient-2, your-recipient-3, …

    Then, in the receipient field put: [your-recipient-1][your-recipient-2][your-recipient-3], my.email@mydomain.com, my.email2@mydomain.com

    or, if you want to be absolutely sure that only the emailaddress in the visible group will be sent to: [Gauteng][your-recipient-1][/Gauteng][KwaZulu-Natal][your-recipient-2][/KwaZulu-Natal][Limpopo][your-recipient-3][/Limpopo], my.email@mydomain.com, my.email2@mydomain.com

    • This reply was modified 5 months, 4 weeks ago by  Jules Colle.

    Hi Jules

    Thanks for this, that makes sense.

    I’ve employed your second option and it works;

    Despite getting a “Invalid mailbox syntax is used.” configuration error on the From field.

    [Gauteng][your-recipient-1][/Gauteng][KwaZulu-Natal][your-recipient-2][/KwaZulu-Natal][Limpopo][your-recipient-3][/Limpopo][Mpumalanga][your-recipient-4][/Mpumalanga][North-West][your-recipient-5][/North-West][The-Eastern-Cape][your-recipient-6][/The-Eastern-Cape][The-Free-State][your-recipient-7][/The-Free-State][The-Northern-Cape][your-recipient-8][/The-Northern-Cape][The-Western-Cape][your-recipient-9][/The-Western-Cape][Namibia][your-recipient-10][/Namibia][Botswana][your-recipient-11][/Botswana][Zimbabwe][your-recipient-12][/Zimbabwe][Mozambique][your-recipient-13][/Mozambique][Swaziland][your-recipient-14][/Swaziland][Lesotho][your-recipient-15][/Lesotho][Other][your-recipient-16][/Other], my_email1@domain.com, my_email2@domain.com

    Any idea why I’m getting the configuration error?

    Thanks!

    Plugin Author Jules Colle

    (@jules-colle)

    the configuration errors are built-in to CF7 since a couple of months now. I haven’t got to hooking into them with my plugin. For the time being you can just ignore the error, I might look into it later.

    Thank you for your support, Jules!

    Plugin Author Jules Colle

    (@jules-colle)

    You’re welcome, Darryl! Feel free to leave a review if you have the time. Cheers!

    JULES YOU’RE AN ANGEL!

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