Contact form 7 select box different value-text than content-text in option

Does anyone know how I can set a different value in the select options in the Contact Form 7 plugin? Here is an example of the HTML I'd like it to generate:

select
    option value=1My car/option
    option value=2Your car/option
/select

Topic select plugin-contact-form-7 options forms plugins Wordpress

Category Web


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!


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...

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.