[Plugin: Contact Form 7] Execute PHP at "on_sent_ok" time
-
I’ve read all the posts but can not find anything that does what I want to do … and it’s simple!
I just want to make a very small update to the wp-usermeta table that relates to the user that has just filled out the form. It appears that the Additional Settings area is dedicated to javascript, which is Hebrew to me. Is there some way I can execute a PHP (specifically, a wpdb statement) at this point? I know who is logged on and I know the other piece of info I want to store (from the form) – I just want to do it, with out major hacking … or having to use the DB extension (it builds it’s own table and does all sorts of stuff I don’t want to do – so I’d have to hack it too).
I thought about calling another page from the Additional Setting section using the sample “on_sent_ok” hook but I don’t know how to send variables to the redirected page, like this?
on_sent_ok: “location.replace(‘https://www.YOURSITE.com?var1=fred&var2=joe’);”,
where fred and joe are fields (some special-mail-tags) from the form
being submitted. There must be an easy way to do this that doesn’t require chopping in to the code (I tried for an hour with this little baby …add_action(‘wpcf7_before_send_mail’, array(&$this, ‘theFunction’));
but I couldn’t get it to work (and I broke the form).
Has anyone done anything like what I want to do?
Dave
- The topic ‘[Plugin: Contact Form 7] Execute PHP at "on_sent_ok" time’ is closed to new replies.