Title: Execute a javascript on form submit
Last modified: August 31, 2016

---

# Execute a javascript on form submit

 *  Resolved [danfox](https://wordpress.org/support/users/danfox/)
 * (@danfox)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/execute-a-javascript-on-form-submit/)
 * I need to send the email address to mailchimp when the user submit the form.
   
   I have a jquery code.
 * How can I do this?
 * [https://wordpress.org/plugins/cforms2/](https://wordpress.org/plugins/cforms2/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [bgermann](https://wordpress.org/support/users/bgermann/)
 * (@bgermann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/execute-a-javascript-on-form-submit/#post-7150083)
 * The simplest, but also ugly solution would be placing the jQuery code in an embedded
   script tag in the form’s success message.

Viewing 1 replies (of 1 total)

The topic ‘Execute a javascript on form submit’ is closed to new replies.

 * ![](https://ps.w.org/cforms2/assets/icon-128x128.png?rev=1010031)
 * [cformsII](https://wordpress.org/plugins/cforms2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cforms2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cforms2/)
 * [Active Topics](https://wordpress.org/support/plugin/cforms2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cforms2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cforms2/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)

 * 1 reply
 * 2 participants
 * Last reply from: [bgermann](https://wordpress.org/support/users/bgermann/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/execute-a-javascript-on-form-submit/#post-7150083)
 * Status: resolved