Expand my Community achievements bar.

Question regarding scripting for check box autofill

Avatar

Level 1

Hello Adobe Community,

Novice Adobe user HERE!  Thank you in advance for any brain power you dedicate to helping me. 

My question is this, I have a form, that based upon clicking a CHECKBOX on a line item, based upon that being checked, will automatically check corresponding checkboxes in the form.  The form is 2 pages long and I DON'T know how to do it in MS Word, thus me seeking an alternate program to do it in. 

So for example:

I have question #1, If Yes is checked, then 5 other checkboxes will automatically autofill.  If No is checked, nothing happens. I DON'T know code, But I can copy and paste really well as well as learn the code.

Thank you so much for your time.

Best

AWD!

2 Replies

Avatar

Former Community Member

On click event of one checkbox try the below script.

  if(this.rawValue== 1){

xfa.host.messageBox("true");

   xfa.form.form1.sub.CheckBox2.rawValue = 1;

xfa.form.form1.sub.CheckBox3.rawValue = 1;

   }

else

{

xfa.form.form1.sub.CheckBox2.rawValue =0 ;

xfa.form.form1.sub.CheckBox3.rawValue =0;

}

Regards,

Vijay

Avatar

Level 1

Thank you I will try and let you know my outcome