Title: [Plugin: Contact Form 7] Trigger jQuery Event
Last modified: August 20, 2016

---

# [Plugin: Contact Form 7] Trigger jQuery Event

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-trigger-jquery-event/)
 * If I’m reading the JS right, you are reseting the form manually after an succesful
   submit. Could you trigger an jQuery Event so that I can modify the selected value
   afterwards? Something like `form.trigger('reset');` in clearFields() and resetForm().
 * [http://wordpress.org/extend/plugins/contact-form-7/](http://wordpress.org/extend/plugins/contact-form-7/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-contact-form-7-trigger-jquery-event/#post-2655060)
 * Okay, after some debugging I realized that:
    1) The reset event _already is_ 
   called 2) However, wpcf7 clears the form after resetting it, so that the changes
   made during the reset form are overwritten by clearForm 3) Thus, I’d suggest 
   triggering the jQuery form handlers after clearing the form:
 * `$(data.into).find('form').resetForm().clearForm().triggerHandler('reset');`
   (
   script.js:58)
 * (`triggerHandler` does not call the standard reset form event, but only those
   added via jquery’s `bind`. So standard functionality is not affected by this 
   change, and the form isn’t reset twice.)
 * Would you please apply this patch? You could also trigger a custom event such
   as `'wpcf7_submit_success'` or similar.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Contact Form 7] Trigger jQuery Event’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-contact-form-7-trigger-jquery-event/#post-2655060)
 * Status: not resolved