Rating: 5 stars
Very handy to add fields the user can’t edit, in order to produce pdf contracts.
]]>Rating: 5 stars
Great plugin, works a treat. Very handy…
]]>Rating: 5 stars
Works exactly as it says. This was a great timesaver. Simply give the field a class of “readonly” (or “disabled”) and you’re done.
Thank you for a great plugin!
Rating: 5 stars
Im running this JS in my own custom file, but for those of you who want this to function in this plugin while using ajax you can change your disable-gf-fields.js file to the following code this can be done by editing the plugin file in through the WP plugin after installation by going to your admin screen and then plugins, then click edit next to this plugin and select the file . ..or you can just edit the js file before installation. anyway, gravity forms has a simple after render hook to allow for things to take place after any ajax or other renders of the form so you can just rerun the code any time the form is rendered by replacing this files code with this.
jQuery(document).ready(function($){
$(".disabled input").attr('disabled','true');
$(".readonly input").attr('readonly','true');
});
$(document).bind('gform_post_render', function(){
$(".gform_wrapper .readonly input").attr("readonly", true);
$(".gform_wrapper .disabled input").attr("disabled", true);
});
then the plugin will work with ajax as well.
THIS WILL ONLY WORK WITH READONLY to retain field data if you are pre-populateting the field dynamically!
Disabled fields do not pass information to the server and as such do not retain any pre populated data from a query string or shortcode ect. with the ajax call such as after a failed submission or page change and will fall back to their default state.
..you can however just set the default value of a disabled field if it is a constant value to be pre-populated, and it will work fine. but the data still will not be submitted with the form. you should use readonly to have the data passed.
]]>Rating: 5 stars
just make this standard by GravityForms; it works perfect!
]]>Rating: 5 stars
Glad someone did the hassle of making this plugin ??
]]>Rating: 5 stars
Very simple to use and it just saves my day from writing javascript.
]]>Rating: 5 stars
You absolutely rock. I’ve been tearing my hair out for hours over this and the plugin works like magic. All the old code snippets around the web don’t work, but this does. Thanks!
]]>Rating: 5 stars
Thanks so much for this, works as promised. At the moment either attribute (disabled/readonly) works for me but I like having the option if needed.
The only issue occurred when conditional logic was used, it killed the form – nothing displayed. Turns out jquery conflicts were to blame, after running the “jQuery Updater” plugin all is working perfectly.
This really ought to be built into Gravity forms standard settings, thanks again.
]]>Rating: 5 stars
Just after I had to disable the editing of one of the GravityForms fields, I took a quick search and found this plugin to help me. Really useful but really small plugin.
]]>