Closed onshop closed 9 years ago
I have a workaround:
$("#business_case").dependsOn({
'#has_business_case': {
values: ['1']
}
}, {
hide: false,
onDisable: function() {
$('#business_case').removeAttr("disabled").prop("readonly", "readonly");
}
});
@onshop, I agree that there should be a little more flexibility in the way the plugin handles "disabling" a field. I'm considering making an option to either add the disabled attribute, readonly attribute, or do nothing at all (allowing the user to handle the disabled state on their own).
My form fields will not validate if disabled when using Zend Framework. The way to get round this is to set them with the attribute 'readonly' so it would be nice to have this as an additional option.