We'll create fresh WordPress site with Contact Form 7 Modules installed. You have 20 minutes to test the plugin after that site we'll be deleted.
The Contact Form 7 plugin has over 1 million active installations, yet the great plugin still lacks a simple feature: hidden fields. This plugin adds hidden fields to Contact Form 7 once and for all.
You can also choose to have the value of the hidden field dynamically populated in your form when you are contacted. To do so, choose the “Default value” to be:
post_title
– Inserts the title of the post/pagepost_category
– The categories of the post or pagepost_url
– The URL of the post or pagepost_author
– The author of the post or pagecustom_field-[Name]
– The value of a post or page’s custom field. If you had a custom field “Foo”, you would use the following as the hidden field value: custom_field-Foo
The following values will be replaced if an user is logged in:
user_name
: User Loginuser_id
: User IDuser_email
: User Email Addressuser_display_name
: Display Name (Generally the first and last name of the user)user_url
: User WebsiteAnd you can also use it for user custom meta data using the format of user-{field}
:
user-aim
: AIMuser-jabber
: Jabber / Google Talkuser-description
: User BioYou can also use a filter: hook into the wpcf7_hidden_field_value
filter to modify the value of the hidden field using add_filter()
. If you know the ID of the input, you can also use the wpcf7_hidden_field_value_[#ID]
filter.
Now, when someone contacts you using your Contact Form 7 contact form, you can have lots more information about their visit – and you’ll see it when you receive the email that tells you you’ve been contacted.
One of the limitations of Contact Form 7 is that you need to manually add each field to generated emails. This means that if you update the form with a new field and forget to add it to your email message, you won’t receive it in your email. No longer..
Using the Send All Fields module, you simply need to add [all-fields]
to your message, and you will receive every field submitted. If you use HTML formatting, the formatting even looks nice.