Monday, August 25, 2014

Wordpress: Contact Form 7 tips

Hide the error text message on form submission:

Insert into the form anywhere, but preferably at the bottom:

 <div style="display: none;">[response]</div>  

Style the invalid input texts:

You have to style the following in your css file: span.wpcf7-not-valid-tip
You have to add !important to the end of every line to make it work...

Go to another page on successful form submission:

In the Additional Settings field you have to enter something like this:

 on_sent_ok: "location = '/message-sent?p=321423876';"  

The location is the short url of the target page and I think it is useful to also add a parameter that you can use to check if the user did in fact fill in the form or just found the target page by accident. (You can use it to show a different message in that case)