Skip to main content
Participant
August 31, 2023
Question

Colouring the signature field after signing

  • August 31, 2023
  • 1 reply
  • 374 views

Hi,
I would like to change the colour of the signature field after it has been signed. I am using the code as below, but the signature field still remains white.

 

 

function colorMerytorysta1DarkGreen() {

var merytorystaField = this.getField("Merytorysta1");

 

if (merytorystaField.signatureInfo.numSignatures > 0) { 

merytorystaField.fillColor = color.red;

 

} else {

 

merytorystaField.textColor = color.transparent;

}

}

 

colorMerytorysta1Red();

 

I also tried changing the condition to an empty value, but still no result

This topic has been closed for replies.

1 reply

Participant
September 1, 2023

I made a small mistake, the correct code below.
However, it is still not working.

 

 

function colorMerytorysta1Red() {

var merytorystaField = this.getField("Merytorysta1");

 

if (merytorystaField.signatureInfo.numSignatures > 0) { 

merytorystaField.fillColor = color.red;

 

} else {

 

merytorystaField.textColor = color.transparent;

}

}

 

colorMerytorysta1Red();