Contact Form 7 is one of the widely popular free contact form plugin and also my favorite WordPress plugin. Contact forms are mandatory for any blogs and being free to use along with frequent updates, Contact Form 7 secured its place among the most downloaded WordPress contact form plugin.
I got to write this post since many asked me personally through email about Contact Form 7 tips for display thank you page after hitting the “Send” button and so on. So are some essential tips for Contact Form 7 users.
Redirecting to Thank You page
Contact Form 7 by default display a message instantly after submitting the form. But some of you might want to redirect to a Thank You page after the form gets submission. So here’s how to do that
Go to Contact Form 7’s setting page and enter the follow code inside the Additional Settings box
on_sent_ok: "location.replace('http://YOUR WEBSITE URL');"
Adding Datepicker
If your using Contact Form 7 for registration, adding date picker is mandatory. Thanks to the Datepicker add-on for the Contact Form 7 based on jsDatePick script. So the next time, when someone click the date picker a small popup box to easily pick the dates.
Download Datepicker plugin For CF7
Adding the standard Contact form code contact-form 1 "Contact form 1"
to the sidebar works, but there are some issues in submitting the form. So here is a simple method. Go to Appearance>Editor and post the below script on sidebar.php or Install PHP Code Widget and add the code demonstrated below inside the PHP Code Widget
<?php echo do_shortcode('[INSERT YOUR CONTACT FORM 7 FORM CODE]'); ?>
Prevent Spam Submissions
Noting can be frustrating like receiving tons of spams on your inbox. Thanks to Gmail’s smart spam detection but still we do get SPAM submissions. Contact Form 7 reCAPTCHA Extension adds a new tag to the Contact Form 7, so adding a captcha to your contact form is never been this easy.
Download Contact Form 7 reCAPTCHA Extension
Show IP Address of the sender
Get the IP address of the sender on the submission mail by adding the code shown below to the Contact Form 7’s Message Body
[wpcf7.remote_ip]
So from next time, you will be getting the sender’s IP address along with other field inputs on the mail.
That’s it for now. I will try to update more tips in the coming weeks. Do share the post, if your find it useful.