I’ve recently tried to install the plug-in Contact Form 7 on a the GrungeMag theme from Elegant Themes and here’s the contact form page – but I can’t seem to send email via the form! Any ideas from anyone out there how to repair this? I’ve found one helpful page yet I haven’t really stepped through it and see what I could do. Here are some interesting thoughts from the comments:
Important.. This solution only works if you have/want a designated landing page for all forms you are using with Contact Form 7.
Step 1: Browse to wp-content/plugins/contact-form-7
Step 2: Open the contact-form-7.js file in your favorite text editor.
Step 3: Look for the function: wpcf7ProcessJson (line 63)
Step 4: Look for the if statement: if (1 == data.mailSent) (line 90)
Step 5: Insert this line after the jquery (line 92) – location.href=”http://www.yourdomain.com/yourthankyoupage”;
Step 6: Save the file to your server, and test out the form.
Ideally, the author of this plugin will make a change in the next release that allows a custom variable (url) to be stored for each contact form. But until then.. here’s your fix !!!”
My problem might be related to the solution above but I think Imight have t manipulate one of the files that Contact Form 7 as one comments suggest:
“here it is in non script format
Within the landing page you are directing to, add the below into the header..
openphp $formorigin = $_SERVER['HTTP_REFERER']; closephp
Then, on your landing page use the below code to display different messages depending on which page they came from.
openphp if($formorigin ==”http://domain.com/form1/”)
html p thankyou message for form 1 html close-p
html p thankyou message for form 2 html close-p
html p Content to display if visiting the page from anywhere other than your form page
openphp } closephp"
Basically replace the openphp, closephp, html p and html close-p with the relevant markup”
So there. I’ll look in to this in more detail later.