WordPress.org

Forums

Contact Form 7
[resolved] Sending to different addresses based on checkbox selected (20 posts)

  1. sixfootjames
    Member
    Posted 2 years ago #

    Hi,

    I've read about using the pipe option which allows one to select to different people, but I need to be able to do this based on the checkbox selection someone makes which will then send to either one or two parties.

    For instance, if someone chooses that they are interested in any of the below options

    1. Kitchens
    2. Dining Room
    3. Lounge

    it would send to the Kitchen and Dining Room departments if the person selected the Kitchens and Dining Rooms checkboxes. If they select only Lounge, it would send only to the Lounge department.

    Hope this makes sense?

    Thank you!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    The pipe is available for checkboxes as well as drop-down menu.

  3. sixfootjames
    Member
    Posted 2 years ago #

    Thanks Takayuki, I will have a look at it again in the morning.
    Very quick response, thanks.

  4. sixfootjames
    Member
    Posted 2 years ago #

    Hi Takayuki

    I've tried it with a SELECT which worked well but as soon as I use the CHECKBOX option as below...

    [checkbox i_am_interested_in class:i_am_interested_in use_label_element email-recipient "General|james....@gmail.com" "Undergraduate admission|james@va...co.za"]

    (removed domain names in emails)

    I get an error message...

    "Failed to send your message. Please try later or contact the administrator by another method."

    I'm following examples from this guy's site too but nothing I am doing has worked: http://brandoncoppernoll.com/how-to-use-pipes-in-contact-form-7/

    Is there something specific that needs to happen with checkboxes?

    Thanks

  5. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    What did you put in the To field in the Mail section?

  6. sixfootjames
    Member
    Posted 2 years ago #

    In the To field I have [email-recipient] Takayuki.

  7. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    See docs first.

    You are using wrong tag.

  8. sixfootjames
    Member
    Posted 2 years ago #

    Hi Takayuki,

    Thank you but believe me when I say I have read through all of your documentation and applied several options and tested again and again.

    I am now following this tutorial of yours:

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

    Here is my sample again:

    [checkbox i-am-interested-in class:i_am_interested_in use_label_element your-recipient "Undergraduate studies|james1@gmail.com" "Postgraduate studies|james2@gmail.com" "Careers|james3@gmail.com" "Research|james4@gmail.com" "General|james5@gmail.com"]

    And this is in my TO: field

    [your-recipient]

    I do appreciate your help.

  9. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    [checkbox i-am-interested-in class:i_am_interested_in use_label_element your-recipient "Undergraduate studies|james1@gmail.com" "Postgraduate studies|james2@gmail.com" "Careers|james3@gmail.com" "Research|james4@gmail.com" "General|james5@gmail.com"]

    When you use this form-tag in a form, the corresponding mail-tag is [i-am-interested-in]. Not [your-recipient].

    Getting Started with Contact Form 7

  10. sixfootjames
    Member
    Posted 2 years ago #

    Thanks Takayuki.

    I misinterpreted the instructions it seems but upon copying example exactly, I came right in the end which is as you explain it above.

    I thought that your-recipient was THE tag that MUST be used to pull all the emails through.

    I am having a slightly different problem now but I will first do some research again and then ask the question.

    Thanks again for you time!

  11. sixfootjames
    Member
    Posted 2 years ago #

    Sorted! Thanks again Takayuki! Great plugin.

  12. graphicpilot
    Member
    Posted 2 years ago #

    I was having a similar problem suddenly this morning on a client's site. I don't know why it suddenly started, but in my case, it had to do with spaces before and/or after the pipes in the recipient selections. Once I removed those it worked again.

    My guess is that perhaps an update made the plugin more picky for syntax on the selections?

    How it looked before:
    [select choose-recipient "General Contact | info@domain-name.org" "Some Department Name | address@domain-name.org" "Another Person | Joe Citizen <joe@domain-name.org>" "Asst. to Joe | Joe Citizen Jr <joejr@domain-name.org>"]

    What fixed it:
    [select choose-recipient "General Contact|info@domain-name.org" "Some Department Name|address@domain-name.org" "Another Person|Joe Citizen<joe@domain-name.org>" "Asst. to Joe|Joe Citizen Jr<joejr@domain-name.org>"]

  13. SandyMe
    Member
    Posted 2 years ago #

    Thank you graphicpilot! That solved my problem. I've been trying to find the solution for hours.

  14. ridgetop12
    Member
    Posted 2 years ago #

    I am having the same problem, but can't figure out what I have wrong.

    <p>Your Name (required)
    [text* your-name] </p>

    <p>Your Email (required)
    [email* your-email] </p>

    <p> Send to: [select choose-recipient "Membership|membership@ridgetop.org" "Waitlist|waitlist@ridgetop.org"]</p>

    <p>Subject
    [text your-subject] </p>

    <p>Your Message
    [textarea your-message] </p>

    <p>[submit "Send"]</p>

  15. EfremJ
    Member
    Posted 2 years ago #

    Having the same problem here even after removing spaces on each side of the pipes.

    Hopefully the developer will jump in this topic soon.

  16. canyouhelpme
    Member
    Posted 2 years ago #

    Bonjour

    Même souci, cela fait des heures ( et encore je suis modeste)
    que je tourne en rond pour trouver la solution
    Impossible d'envoyer à un destinataire sélectionné dans le menu déroulant
    la syntaxe que j'utilise est par exemple
    [select votre-destinataire "support | support@monasso.fr" "vente | vente@vente@monasso.fr"]
    Dans le champ A des emails j'indique [votre-destinaire]
    j'ai retourné le problème dans tous les sens
    supprimé les espaces
    Ca ne fonctionne pas
    Est ce que cela peut provenir d'une fonction php a activer
    D'avance merci pour votre aide
    @+

    As I am French, yes nobody is perfect
    I put the translation of my post provided by Google :-)

    Hello

    Same problem, it's been hours (and still I am modest)
    I turn around to find the solution
    Unable to send a selected destination from the drop down menu
    the syntax I use is for example
    [select your-recipient "support | support@monasso.fr" "sale | sale @ vente@monasso.fr"]
    In the To field of the emails I indicate [your-recipient]
    I returned the problem in all directions
    removing leading spaces
    It does not work

    Does it can come from a php function enable

    Thank you in advance for your help
    @ +

  17. casshern83fr
    Member
    Posted 1 year ago #

    http://wordpress.org/support/topic/plugin-contact-form-7-pipes-for-selectable-email-recipient-doesnt-work?replies=6#post-4511214

    version du plugins utilise : 3.5.2 Contact form 7

    cela fonctionne pour moi si ton probleme n'est toujours pas resolu

    plugin version use : 3.5.2 Contact form 7

    it works for me, if your problem is still not resolved

  18. esmi
    Forum Moderator
    Posted 1 year ago #

    These are English language forums, so please use English. Alternatively, use a WP support forum in your language.

  19. casshern83fr
    Member
    Posted 1 year ago #

    I respond for last reply for french guy canyouhelpme, sorry for that i can modify my answer in eglish.

  20. canyouhelpme
    Member
    Posted 1 year ago #

    Hello

    thank you for your answer
    No it does not work
    but I have not tried it since my message
    lack of time
    Could you tell me what exact syntax I need to use
    This can also be a problem with sending messages on the hoster
    but I do not think

    Thank you in advance for your answer

    cordially

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic