Mike Waller
asked on
forward Contact Form 7 form data
I'm using Contact Form 7 in my Wordpress site. When the user submits the form, I need to forward all the form field data to an email I'm storing in a cookie (cookie.email). Where would I implement that in either the wordpress plugin or directly in the scripts?
ASKER
so if i use that, how would I forward that form submission to the email that's in the cookie?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
so by using that, in addition to submitting the email, it will allow me to forward the form data to anyone as well?
ASKER
looks powerful. Can it be used in a wordpress widget though and not only a page?
ASKER
ok, I figured it out, thx!
As long as the widget supports shortcode.
To enable short-codes inside widgets you need to add this to your themes functions.php file. Just before the closing ?> tag at the bottom. Make sure you have FTP access to your website before adjusting the code. Any malformed code will cause it to crash. If you back up the file you can just place it back in you website file system.
Here is the code:
To enable short-codes inside widgets you need to add this to your themes functions.php file. Just before the closing ?> tag at the bottom. Make sure you have FTP access to your website before adjusting the code. Any malformed code will cause it to crash. If you back up the file you can just place it back in you website file system.
Here is the code:
add_filter('widget_text', 'do_shortcode');
ASKER
ok, thanks!
ASKER
so now that I'm using that, I wonder how I can send the form using the email in the cookie?
That part is a little more work. You will need to create a new page template by copying your page.php file and pasting it into a text document. You will need to add this code to the top of the page template:
Then create a new page in your page editor and name it whatever you want. You will then need to add an iFrame to the page:
You will need this plug-in:
http://wordpress.org/extend/plugins/embed-iframe/
The rest is explained here:
http://www.developertutorials.com/tutorials/javascript/sending-cookies-050314-1337/
You will need to do a little improvising to transform it into your plug-in. Just create the form fields instead of creating the form that this suggests.
<?php
/*
Template Name: page name here!
*/
?>
You will need to add your header.php code just after that, followed by the page.php code (all inside the custom page).Then create a new page in your page editor and name it whatever you want. You will then need to add an iFrame to the page:
You will need this plug-in:
http://wordpress.org/extend/plugins/embed-iframe/
The rest is explained here:
http://www.developertutorials.com/tutorials/javascript/sending-cookies-050314-1337/
You will need to do a little improvising to transform it into your plug-in. Just create the form fields instead of creating the form that this suggests.
ASKER
I have coldfusion on the server too which I can use. I was going to redirect the page to a cfm page. But how would I push the form field variables to that cfm page?
I will have to look into it tomorrow. I am not sure about coldfusion. I will see how it can integrate into the plug-in. If I come up with how, or a better way I will post it here.
http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/