Disable multiple dropdown fields
Posted: 02 Jul 2018
Hello,
I would like to make a group of dropdown fields readonly on the Edit form based on a Status field. Please advise.
I've given the fields the css-class name 'form-b4'
Here is a snippet of my code
function setFields() {
if (fd.field('Status').value()=='Pending'){
$('.form-b4').prop('disabled', true);
} else {
$('.form-b4').prop('enabled', true);
}
//status on change
fd.field('Status').control().change(function() {
setFields();
});
//Initialize
setFields();
I would like to make a group of dropdown fields readonly on the Edit form based on a Status field. Please advise.
I've given the fields the css-class name 'form-b4'
Here is a snippet of my code
function setFields() {
if (fd.field('Status').value()=='Pending'){
$('.form-b4').prop('disabled', true);
} else {
$('.form-b4').prop('enabled', true);
}
//status on change
fd.field('Status').control().change(function() {
setFields();
});
//Initialize
setFields();