Contact Form 7 gives you the capabilities to create forms to accomplish a variety of needs. There is a feature that exists that some may not realize, and it can be very powerful in how you use it. Contact Form 7 has the ability for pipe (‘|’) support which allows you to present one value to people who submit the form, and then get a different value passed to you via an email.
You can use the pipe only in the drop-down menu values, radio buttons, or checkboxes. By default, this feature is available to installations of the plugin. The anatomy of the value is “<user-visible-field>|<data-value>”.
Applying the Pipe in the Field
One of the most common uses is providing a series of options to users and using those options to select who may receive an email. This can be done via select, radio, or checkbox tags.
[select* email-recipient “Salesfirstname.lastname@example.org” “Tech Supportemail@example.com” “Inquiryfirstname.lastname@example.org”]
The “*” indicates the field is required.
Get the Value of the Field
Using our example above, it’s time to get the value and send an email to the selected email address. Within the Mail section, look at the To: field. You will want to include [email-recipient] in this field, and the value after the pipe is used for the email recipient.
Using the example created above, this is how the form will look.