Title: Feature: Gray out Submit button when disabled
Last modified: August 22, 2016

---

# Feature: Gray out Submit button when disabled

 *  Resolved [Robert](https://wordpress.org/support/users/kinderrwindstreamnet/)
 * (@kinderrwindstreamnet)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/feature-gray-out-submit-button-when-disabled/)
 * Excellent progress on the plugin updates! Made a donation to support your work.
 * Would it be possible to color the comment form submit button background and text
   gray when it’s disabled, then restore the default button colors when the captcha
   is validated?
 * Alternatively, an AJAX solution to intercept the submit button click event and
   display an inline error message if the captcha isn’t validated would be even 
   more user friendly, avoid the need to disable the submit button and the wp_die()
   error message on a new page.
 * Thanks
 * [https://wordpress.org/plugins/wp-recaptcha-integration/](https://wordpress.org/plugins/wp-recaptcha-integration/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [podpirate](https://wordpress.org/support/users/podpirate/)
 * (@podpirate)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/feature-gray-out-submit-button-when-disabled/#post-5625956)
 * Hi Robert,
 * Donation recieved, thank you so much!
 * > Would it be possible to color the comment form submit button background and
   text gray when it’s disabled, then restore the default button colors when the
   captcha is validated?
 * The style of a disabled button is highly depending on Your theme. During testing
   I noticed that Twentyfifteen already does grays out disabled buttons but twentyfourteen
   doesn’t.
    A few lines of css can fix this:
 *  input[type=’submit’][disabled],button[disabled] {
    color:#999; background-color:#
   ccc; }
 * I just created a gist that integrates it into the WordPress frontend: [https://gist.github.com/mcguffin/7cbfb0dab73eb32cb4a2](https://gist.github.com/mcguffin/7cbfb0dab73eb32cb4a2)
    1. Click “Download Gist” and unpack the .tar.gz file.
    2. Create a zip archive from the included `grey-out-disabled.php`
    3. install and activate it like any other plugin.
 * > Alternatively, an AJAX solution to intercept the submit button click event 
   and display an inline error message if the captcha isn’t validated would be even
   more user friendly, avoid the need to disable the submit button and the wp_die()
   error message on a new page.
 * Hmm. A captcha cannot be validated by the Google API more than one time. This
   is why captcha validation and comment form processing must happen in one turn
   and during one and the same server request. Splitting captcha validation and 
   comment form processing could open some possible vulnerabilities.
    In v1.0.4 (
   will be up soon) I added some minor changes to the JS, to make it work together
   with this plugin (it’s sending comments through ajax): [https://wordpress.org/plugins/wp-ajaxify-comments/](https://wordpress.org/plugins/wp-ajaxify-comments/)
 * Happy new year!
    jörn

Viewing 1 replies (of 1 total)

The topic ‘Feature: Gray out Submit button when disabled’ is closed to new replies.

 * ![](https://ps.w.org/wp-recaptcha-integration/assets/icon-256x256.png?rev=2337056)
 * [ReCaptcha Integration for WordPress](https://wordpress.org/plugins/wp-recaptcha-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-recaptcha-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-recaptcha-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-recaptcha-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-recaptcha-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-recaptcha-integration/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [No captcha](https://wordpress.org/support/topic-tag/no-captcha/)
 * [wp_die](https://wordpress.org/support/topic-tag/wp_die/)

 * 1 reply
 * 2 participants
 * Last reply from: [podpirate](https://wordpress.org/support/users/podpirate/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/feature-gray-out-submit-button-when-disabled/#post-5625956)
 * Status: resolved