WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

DSoes anyone know how I can set a different valute in the select-options in contact form 7 plugin? Here is an HTML example of what I'm trying to do

<option value="1">My car</option>
<option value="2">Your car</option>
share|improve this question

closed as off-topic by Pieter Goosen, toscho Jul 28 '14 at 7:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

If no native solution exists, you can solve this with jQuery val(), show() and hide(). – brasofilo Jun 21 '12 at 13:15
up vote 7 down vote accepted

It looks like this is supported by Contact Form 7 natively, it's just not very obvious on how to make it happen.

Here's a documentation page explaining the functionality: http://contactform7.com/selectable-recipient-with-pipes/

Basically all you have to do is put the values like so:

Visible Value|actual-form-value

What comes before the pipe "|" character will be shown in the form, and what comes after will be the actual value filled in for the form.

Hope that helps!

share|improve this answer
This does not work. There documentation is incorrect. – Solomon Closson Sep 16 '15 at 18:25
@SolomonClosson Actually this still works; it's just funky. The form HTML doesn't show the 'raw' value, but as the link states at the end you can access them with the prefix _raw_, e.g. _raw_YOURFIELD rather than YOURFIELD. – drzaus Dec 4 '15 at 2:57

I solved this by publishing the standard contct form 7 form first, then I copied the source code created from all the short-codes from contact form 7. Then insteaed of using the shortcode as the select tag I used a real select-tag with in it. This way I could use the contact form 7 engine and at the same time set my own value-text in the option tags...

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.