Title: [Plugin: WP Captcha-Free] Problem in JS script
Last modified: August 20, 2016

---

# [Plugin: WP Captcha-Free] Problem in JS script

 *  [n4r.c0m](https://wordpress.org/support/users/n4rc0m/)
 * (@n4rc0m)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-captcha-free-problem-in-js-script/)
 * Hello.
 * I found a little problem in Captcha-free script.
    After storing hash in #captchafree
   input gothash() function tries to submit a form by this line: `document.getElementById('
   submit').click();`
 * The problem appears if page have another form with #submit button and this form
   located earlier in HTML than comment form.
    In my case footer have login form,
   so gothash() function take submit button in login form and successfully .click()
   it.
 * Solution:
    replace `document.getElementById('submit').click();` by `document.
   getElementById('captchafree').form.submit();`
 * [http://wordpress.org/extend/plugins/wp-captcha-free/](http://wordpress.org/extend/plugins/wp-captcha-free/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [n4r.c0m](https://wordpress.org/support/users/n4rc0m/)
 * (@n4rc0m)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-captcha-free-problem-in-js-script/#post-2371025)
 * I’m sorry, there is no submit() method of the form element.
    Use: `document.getElementById('
   captchafree').form.submit.click();`

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP Captcha-Free] Problem in JS script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-captcha-free.svg)
 * [WP Captcha-Free](https://wordpress.org/plugins/wp-captcha-free/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-captcha-free/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-captcha-free/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-captcha-free/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-captcha-free/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-captcha-free/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [n4r.c0m](https://wordpress.org/support/users/n4rc0m/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-captcha-free-problem-in-js-script/#post-2371025)
 * Status: not resolved