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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Reading checkbox values and putting text in text field based on selections

Avatar

Level 1

I have a form developed in Lifecycle used as an inspection form. It is dynamic as one of the tables need to grow based on device count. I have used the following code in Acrobat to read and populate the textfield where the comments are visible This is the code used in Acrobat and it allows me to check and uncheck the checkboxes and the comments change.

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

  • o.value = "";

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

if(f.isBoxChecked(1)) o.value = o.value + "#1 DEFICIENCY: 25:4.1.6* Changes in Occupancy, Use, Process, or Materials. The property owner or designated representative shall not make changes in the occupancy, the use or process, or the materials used or stored in the building without evaluation of the fire protection systems for their capability to protect the new occupancy, use, or materials.\n \n";

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

if(f.isBoxChecked(1)) o.value = o.value + "#2 DEFICIENCY: 25:3.3.23 Inspection. A visual examination of a system or portion thereof to verify that it appears to be in operating condition and is free of physical damage.\n \n";

This code works in Acrobat and is a calculation.

.

I found samples for Jscript and tried to make work, however, if I change the text box value the text does not update and i get double text of the same value. I used the rawValue syntax. Please guide me in the right direction

Thanks

0 Replies

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now