Skip to main content
Inspiring
December 4, 2020
Answered

Make a alternate buttons appear depending if signature field is filled or not

  • December 4, 2020
  • 1 reply
  • 548 views

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!

This topic has been closed for replies.
Correct answer staceym73714452

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;
}

1 reply

Inspiring
December 7, 2020

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;
}

staceym73714452AuthorCorrect answer
Inspiring
December 7, 2020

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;
}