Copy link to clipboard
Copied
Note: I am using Acrobat XI Pro (not LiveCycle Designer)
I need to have an "URGENT" label pop up on the first page of a PDF form in response to a particular signature field being signed. I was thinking of creating a field with URGENT in big red letters, and then having it hidden by default. I think I figured out how to determine if the sig field is signed:
var oSigState = this.getField("Signature17").signatureInfo().status;
if the oSigState variable is 0, it's unsigned, and the field stays hidden.
I figure using an if-then statement based on the value of oSigState could then be used to change the display attribute, but I am a little unsure about how to do that. Any suggestions? I am a javascript newbie. Also, how would I assign the display state to hidden to begin with?
Thanks in advance!
Marshall Jones
Copy link to clipboard
Copied
Use this code as the field's custom calculation script:
var oSigState = this.getField("Signature17").signatureInfo().status;
event.target.display = (oSigState==0) ? display.hidden : display.visible;
Copy link to clipboard
Copied
I decided to go with a check box instead:
if (this.getField("Check Box2").value !="Off")
{
event.target.display= display.visible;
}
else event.target.display=display.hidden;
Copy link to clipboard
Copied
The problem with this sort of thing is you're making a change to the document after it's been signed, which will require an additional save and it changes will be indicated when validating the signature.
Filling in fields is a common thing to do after a signature field is signed, so I would recommend setting the field value (to "URGENT"/blank) rather than showing/hiding the field.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now