WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just playing around with Wordpress / Contact Form 7.

Is it possible / do you know how to add custom javascript function on successful email send event?

share|improve this question

closed as off-topic by toscho Jul 28 '14 at 7:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

There are a couple of filters inside the function mail_callback(), located in /plugins/contact-form-7/includes/classes.php that may be handy, but donnow how... This forum search may be useful as well. – brasofilo Jul 4 '12 at 17:33
up vote 4 down vote accepted

simply add you JavaScript function to your page then find the Additional Settings field at the bottom of the contact form management page and use the on_sent_ok JavaScript action hook like so:

on_sent_ok: "MY_JavaScript_function_Name();"
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.