Expand my Community achievements bar.

SOLVED

Clearing Signature field

Avatar

Level 4

Good morning all. I am trying to get a signature field, "COUNSELING_DATE_INITIAL5", cleared when No is selected. Below is the javascript I have written, but it is not working.

 

var  question = xfa.host.messageBox("If you have an Entry Card to digitally sign this field,
please select Yes. If not, please select No, complete the form, print, manually signe.\n\n"
, "Question?", 3,2);

 

if (question==3){

  form1.Page1.COUNSELING_DATE_INITIAL5.access ="readOnly";

  form1.Page1.COUNSELING_DATE_INITIAL5.rawValue="";

    xfa.event.reset("form1.Page1.COUNSELING_DATE_INITIAL5");
}

 

if (question==2){

   form1.Page1.COUNSELING_DATE_INITIAL5.access ="open";

  xfa.host.setFocus("form1.Page1.COUNSELING_DATE_INITIAL6");

}

 

Please, I need help with the clearing part of the signature script that deals with the signature field.

Thanks

v/r

Tammy

1 Accepted Solution

Avatar

Correct answer by
Level 4

Thanks all, I finally got it to work. I added the following piece of code

xfa.host.resetData("xfa.form.form1.Page1.COUNSELING_DATE_INITIAL5");

in place of

   xfa.event.reset("form1.Page1.COUNSELING_DATE_INITIAL5");

and it works perfectly.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Thanks all, I finally got it to work. I added the following piece of code

xfa.host.resetData("xfa.form.form1.Page1.COUNSELING_DATE_INITIAL5");

in place of

   xfa.event.reset("form1.Page1.COUNSELING_DATE_INITIAL5");

and it works perfectly.