Copy link to clipboard
Copied
The form has to be submitted to two levels so a new button appears for submitting to the next level. One the form is in the level 2 and level 3 state a "Denied" button appears where these two levels could deny the form and signature fields and submit buttons for level 2 and 3 completely disappear. I also have a "Undo Denied" button incase it is clicked by mistake to make everything reappear.
Currently this when clicking "Undo Denied" this makes both level 2 and level 3 approval buttons appear which I only want one of them to appear dependinf on if the level two signature is already entered or not.
If level two has already signed it then the level 3 submit button needs to be visible, but if the level two signature is not yet signed then the level 2's button needs to be visible instead.
Level 2's button is called: Submit_to_Director
Level 3's button is called: Director_Approved
and Level 2's signature is: Manager_Signature
I've written this, but I'm certain it's incomplete or correct.
if
this.getField("Manager_Signature")==True
then this.getField("Director_Approved").display = display.visible;
else
this.getField("Submit_to_Director").display = display.visible;
Please advise. Thank you!
Woohoo! Figured it out. Here is the answer for anyone that needs it in the future.
if (this.getField("Manager_Signature").value.length == 0){
this.getField("Submit_to_Director").display = display.visible;
} else {
this.getField("Director_Approved").display = display.visible;
}
Copy link to clipboard
Copied
I've figured out the syntax I was missing, but it's still not working. I'm almost certain it's the "True" statement. I found posts about doing this with checkboxes, but not with a signature field.
if (this.getField("Manager_Signature")==True){
this.getField("Director_Approved").display = display.visible;
} else {
this.getField("Submit_to_Director").display = display.visible;
}
Copy link to clipboard
Copied
Woohoo! Figured it out. Here is the answer for anyone that needs it in the future.
if (this.getField("Manager_Signature").value.length == 0){
this.getField("Submit_to_Director").display = display.visible;
} else {
this.getField("Director_Approved").display = display.visible;
}