I'm not sure if I did it wrong but I copy and pasted the entire code in. Then change to the field name. It doesn't disable still when there's already value in it.
I am trying to disable a people field following some of the info above but it doesn't seem to be working for me. I am trying to incorporate it into disabling multiple fields. My code looks like this:
fd.spRendered(function() {
fd.field('Signature').ready().then(function disablePurchasing() {
if (fd.field('Status').value == 'New' || fd.field('Status').value == 'Pending Approval' ) {
// Setting fields for Step 3 to a disabled state
fd.field('Field 1').disabled = true;
fd.field('Field 2').disabled = true;
fd.field('Signature').disabled = true;
}
else{
// Setting field Step 3 to an editable state
fd.field('Field 1').disabled = false;
fd.field('Field 2').disabled = false;
fd.field('Signature').disabled = false;
}
}
fd.field('Field 1').$on('change',disablePurchasing);
fd.field('Field 2').$on('change',disablePurchasing);
// Calling disablePurchasing on form loading
disablePurchasing();
)});