Disable form fields by adding the CSS class "disabled"
Author: | Ren Ventura (profile at wordpress.org) |
WordPress version required: | |
WordPress version tested: | 5.0 |
Plugin version: | 1.4 |
Added to WordPress repository: | 25-05-2014 |
Last updated: | 09-12-2018
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 10 |
Plugin URI: | https://renventura.com/ |
Total downloads: | 12 357 |
Active installs: | 1 000+ |
Click to start download
|
Screenshots
Gravity Forms Advanced Tab w/ a CSS class of "disabled". This will set the field's attribute to disabled. Alternatively, you can enter the CSS class "readonly" to set the attribute to readonly.
FAQ
How do I use this plugin?
Once you’ve installed and activated the plugin, just add a the appropriate class to your field (“disabled” or “readonly”).
What is the difference between the disabled and readonly attributes?
Both attributes set a field to be uneditable by the user. This means that the field will not accept any input from a user. However, there are a few important differences between the two attributes. Here’s a good overview of disabled vs. readonly attributes.
Do you offer support for this plugin?
This plugin is very simple so it’s unlikely you’ll need support. If you do have any questions, feel free to email me.
ChangeLog
1.4
- Updated to using
$.prop()
instead of $.attr()
- Added support for
textarea
tags
1.3.1
1.3
- Wrapped jQuery dependency in array in the enqueue call
- Removed some specificity from the jQuery selectors (will work for any
input
with the appropriate classes)
1.2
- Added the jQuery dependency to wp_enqueue_scripts() call
1.1
- Added readonly attribute support
1.0