Title: On_sent_ok throwing Uncaught referenceError
Last modified: September 1, 2016

---

# On_sent_ok throwing Uncaught referenceError

 *  [darshan1989](https://wordpress.org/support/users/darshan1989/)
 * (@darshan1989)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/on_sent_ok-throwing-uncaught-referenceerror/)
 * Hello,
 * I know it has been asked in the forum for many times, and most of the time I 
   saw that the problem is with JS conflict, I have followed every troubleshoot 
   step suggested by wordpress to resolve this error including deactivating and 
   reactivating each plugin and default theme, but somehow its not working.
 * All of a sudden today, when I tried to submit my form, the console gave
    `Uncaught
   referenceError: firstname is not defined`
 * Now, I know that firstname is the variable I am defining using jQuery for value
   of a form field in additional setting of my form , but when I try to initialize
   all variables including this with “var”, it gave another error :
    `Unexpected
   token var`
 * I’d appreciate any kind of help from wordpress community.
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘On_sent_ok throwing Uncaught referenceError’ 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/)

## Tags

 * [on_sent_ok](https://wordpress.org/support/topic-tag/on_sent_ok/)
 * [Uncaught ReferenceError](https://wordpress.org/support/topic-tag/uncaught-referenceerror/)

 * 0 replies
 * 1 participant
 * Last reply from: [darshan1989](https://wordpress.org/support/users/darshan1989/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/on_sent_ok-throwing-uncaught-referenceerror/)
 * Status: not resolved