Contact Form 7 – Styling The Submit Button
Contact Form 7 is a very popular contact form plugin for WordPress and here is a quick and easy way to style the Submit button:
- Open your theme’s styling sheet / style.css file
- Add the following code to the style sheet
.wpcf7-submit {
padding: 5px;
} - Save the file and upload it
That’s it! You have just applied a 5 pixel padding to the button and you can apply other formatting to change the background, font size etc by adding further options to the code.
Contact Form 7 – Redirecting After Submit
With thanks to mallsop on the WP Forums, here’s a quick way to get Contact Form 7 to redirect your user after they have successfully sent a message:
- Go to the “Messages” section at the bottom of the page
- Amend the Sender’s message was sent successfully text as follows:
Your message was sent successfully. <script> location.href=”http://www.yoursite.com/thankyou/”; </script> - Save the relevant form
Anyone now successfully sending a message will be redirected to the relevant page.
Adding The Sender’s Information (IP Address, Date and Time)
There are other options as well that can be found on the Contact 7 Special Mail Tags page, however this is useful for tracking potential spammers.
Complete the form as required and then add the following code at the bottom of the Message Body (the response you receive by email):
Sent by IP address [_remote_ip] on the [_date] at [_time].
Not 100% perfect against spoofed addresses but it might help.