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

Dropdown's Selection to Affect/innactivate Other Fields in Adobe LiveCycle

Avatar

Level 2

Hi. I have a table where each line is an entry. The first field of the line is a dropdown selection. I would need this to work where if I select nothing, the rest of the fields on the line are innactive, or read only, or when I select some options from the dropdown some fields become active. Also there are more dropdown fields on the line. They should only allow to be selected certain options from the list depending on the selection of the 1st field.

There are also 2 numeric fields who do some calculations, both do the same thing, however, for example, selection A in the 1st field involves tracking total TimeTotal1 in NumericField1 and selection B in the 1st field involves tracking total NumericField2. In other words, when selecting A, the calculation will be dispayed in NumericField1 while NumericField2 is not displaying anything, and if selecting B, the calculation will be dispayed in NumericField2 while NumericField1 is not displaying anything.

Any help would be great. I am not good at all with any Javascript coding... Thank you!

 

2 Replies

Avatar

Level 9

Hi,

In the exit event of the DropDown write th efollowing script.

if (this.rawValue == null)

     {

          Field1.access = "readOnly"; // Those fields which shall remain inactive.

          Field2.access = "readOnly";

          DropDownList2.access = "readOnly";

     }

else

     {

              

          Field1.access = "open"; // Those fields which shall remain active. 

          Field2.access = "open";

          DropDownList2.access = "open";

          DropDownList2.addItem('A'); // Those specific items that need to be populated in the 2nd DropDown.

          DropDownList2.addItem('B);

     }

if(DrowpDownList.rawValue == 'A')

     {

          Field1.rawValue == "That Value you want to display";

     }

else

     {

            Field2.rawValue == "That Value you want to display";  

     }

Thanks,

Bibhu.

Avatar

Level 2

Hi,

If I use this code in a new form seems to work for 1 field only, like Field1 in the example above. If I place the code in my existant form, which has a subform does not work at all. Any way you can attach an example showing the above code working?

Thank you!

Jess