Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

using check boxes value to populate text field


Level 1

I am new to javascipt programming. I am trying to use the value of checkboxes to populate a text box with text. there are three text boxes for each question labeled "Yes" "No" and "N/A".

If the technician selects "NO', then the text box is populated with the text associated with that question. If user changes to "YES" or "N/A", then the text related to that question is removed.

I have tried various statements, but the results are unacceptable.

I made this work in Adobe Acrobat Professional for the same type of form, but have been unable to make work in Lifecycle. This needs to work in Lifecycle due to use of expanding tables in the form.

Sample of text for Acrobat below.

var o = this.getField("txtDISC");

o.value = "";

var f = this.getField("CB1");

if(f.isBoxChecked(1)) o.value = o.value + "#1 DEFICIENCY: 25:Table Dry Barrel and Wall Hydrants - Inaccessible - Make accessible.\n \n";

var f = this.getField("CB2");

if(f.isBoxChecked(1)) o.value = o.value + "#2 DEFICIENCY: 24: A valve shall be installed in the hydrant connection. Valves in the hydrant connection shall be installed within 20 ft (6.1 m) of the hydrant.\n \n";

var f = this.getField("CB3");

if(f.isBoxChecked(1)) o.value = o.value + "#3 DEFICIENCY: 25:Table  Dry Barrel and Wall Hydrants - Leaks in outlets or at top of hydrant - Repair or replace gaskets, packing, or parts as necessary.\n \n";

var f = this.getField("CB4");

if(f.isBoxChecked(1)) o.value = o.value + "#4 DEFICIENCY: Hydrant caps shall be slightly more than hand tight per manufacturer instructions.\n \n";

Please assist me if possible

Thank you


0 Replies