LoginSignup
6
7

More than 3 years have passed since last update.

Contact Form 7でselectボックスの選択によりメール送信先を変更する

Last updated at Posted at 2018-04-12

Contact Form 7で、問い合わせ先の店舗をselectボックスで選択してもらい、その選択によって、送信先のメールアドレスを変更するようなときに使用できます。

フォームのselect要素

[select* send-to "新宿店|mail01@example.co.jp" "渋谷店|mail02@example.co.jp"]

表示する店舗名と、アドレスを半角のパイプ「|」で挟んで記述する。
send-to の箇所は、適当な名前を。

メールの送信先

_ 2018-04-12 18.34.29.jpg

上記のように記述する。
不明なメールボックス〜のエラーメッセージは無視します。

メール本文

[_raw_send-to]

メール本文には、問い合わせ先の店舗名を表示したい場合、上記のように、_raw_をつけると、パイプの前部分を表示できる。

6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7