Skip to main content
MadMich
Inspiring
September 26, 2016
Question

clear signature javascript

  • September 26, 2016
  • 2 replies
  • 1417 views

I'm trying to clear a field based on a signature field being cleared....

this is what I have so far

if (getField("mySig").value !== '')// signature is present

getField("mytext").value = "N/A" //text in field when signed

else

getField("mytext").value = ''; //blank if signature cleared

Cheers

This topic has been closed for replies.

2 replies

MadMich
MadMichAuthor
Inspiring
September 26, 2016

Thankyou for the reply.

I've been trying to place it in the form calculate of the field. I'm trying to execute this if the signee needs to clear the signature.

I've been asked basically to reset all fields if a signature is is cleared. Not great I know!

cheers

MadMich
MadMichAuthor
Inspiring
September 27, 2016

I managed to get it working using event.target.value

if (getField("mySig").value !== '') // signature is present

    event.target.value = "N/A";

else

    event.target.value = "";

Instead of it being a custom calculation script in a single field, can this be done as a global script to compensate for more than one field?

Cheers

Inspiring
September 26, 2016

Where is that code placed, when are you expecting it to be executed, and what problem are you having with it?