Locking/ Unlocking Field (based on radio buttons) when Signature Field is Hidden/ Visible
The following code is in a calculation field. I have a separate button that hides/ unhides the FC signature field.
The first part works when the FC signature field is hidden but the second part when the FC signature field is visible doesn't work for some reason and I cannot figure out why.
Goal is to lock the BO signature field if the CH signature field is signed (and FC signature field is unsigned) and the FC signature field is visible. In other words, if we unhide the FC signature field after the CH signature field is signed (and FC signature field is unsigned), lock the BO signature field.
if(getField("FC Signature").display = display.hidden)
//when FC sig is hidden, locks BO sig when CH sig is empty/ unlocks BO sig when CH sig is signed
if(getField("CH Signature").value == "")
getField("BO Signature").readonly = true
else
getField("BO Signature").readonly = false
else
//when FC sig is visible, locks BO sig when CH sig is signed and FC sig is empty
if(getField("CH Signature").value != "" && getField("FC Signature").value == "")
getField("BO Signature").readonly = true
