WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Contact Form 7 Conditional Emails (1 post)

  1. mattyk1972
    Member
    Posted 1 year ago #

    Hi there

    I'm trying to set up the contact form on a client's site so that the e-mail address it is sent to depends on which option the site visitor selects from a drop down menu. Basically the client has representatives in different countries and wants the relevant country rep to receive the e-mail when the visitor selects which country they are from - so if they select UK it goes to the UK rep only, if they select USA it goes to the USA rep only, etc...

    The addition of pipes to the form code allows us to achieve this, but it's causing other issues. For example, if we use the pipes setup ("Australia|dave@oz.com") the e-mails are redirected fine, but we cannot get the chosen country to appear in the resulting e-mail, it simply shows the e-mail address instead. We've tried using the alternative mail tag as suggested on the website ([_raw_country]) but this doesn't seem to work either.

    As well as not being able to have the chosen country details in the e-mail that's received, we are also using the Contact Form to DB Extension, and the e-mail address is also being captured as the chosen country in the database.

    Is there a way (either by using the pipes and/or adding some new code) to allow the contact form e-mail to be sent to different addresses depending on which option the visitor picks from the drop down menu, and also capture their selection (not the corresponding e-mail address) in the database and in the e-mail that's sent?

    Thanks

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic