A personal Touch ~ Contact Form 7 and Sessions
I know that this might come in handy for anyone struggling to get Contact Form 7 for Wordpress to say thanks with a personal touch.
I know that this is covered on a few other blog's somewhere, but I've found that they all only have a snippet of code each, so I thought I'd merge it all together so you might also find solace in making it work (finally).
First of all, I've tested this with the latest wordpress 3.9.1 + Contact Form 7, so when I wrote this. The world was a happier place. This might change though in the future, so for the people seeing this in years to come, leave a comment with your twitter (assuming that still exists) and correct anything that's wrong.
Ok, So in your theme, you're going to want to open functions.php, Scroll to the absolute bottom and paste this before the closing php tag:
You're going to want to change the ['your-name'] to whatever field you have in your contact form 7 that you want to display.
What that does, is start a session, then saves that field to the session so you can call it back at any point while you're still in the session
Next, In the Plugin itself, there is an Adittional Settings text area at the bottom, in here, simple paste the 'thank you' link in the gist:
on_sent_ok: "location = 'http://www.formless.me/thankyou';"
Change the URL to your THANK YOU page, that way, once the form is submitted, the form will redirect to that URL.
Now, you've almost done.
Your final part is to echo the field somewhere. Personally, I'd create a template for the THANK YOU page & paste this into it:
Thank You,
That should call up the first-name that i saved to the session when i submitted the form, and should display "Thank you, Andrew". you can then wrap that in tag of your choice and make it feel like your contact form really cares about you :)
Hope that helps someone