Enable/Disable Form Elements

Supplemental 114 views
0 Flares 0 Flares ×

Want to make your forms more user-friendly? Then you can enable or disable form elements such as the submit button. For example, you can have it disabled by default and enable it only if the form has been properly filled by the visitor.

$("#submit-button").attr("disabled", true);

And to re-enable a previously disabled input:


For Reference

Disable re-enable inputs

Provided by: CSS Tricks
Tagged with:
Posted in jQuery


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

No Trackbacks.


Register | Lost your password?
0 Flares Twitter 0 Facebook 0 Google+ 0 0 Flares ×