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

Help with script

Avatar

Level 7

I have 3 DDLists(User Enter Required):

List_A

Items:A, B, C

Value:1, 2, 3

List_B

Items:D, E, F

Value:1, 2, 3

List_C

Items:G, H, K

Value:1, 2, 3

For a Button on Click Event I try to make a Field Visible if all the above Lists are Fill ln - LIKE a validation!

I have try the script below without any lack!

if  ((form1.Page1.List_A.rawValue<0) && (form1.Page1.List_B.rawValue<0)  && (form1.Page1.List_C.rawValue<0)
     )

{
Field.presence = "invisible";

}

else

{

Field.presence = "visible";

}

I will appreciate any Help

Thank you

3 Replies

Avatar

Level 10

The script looks fine  .....did you save the form as dynamic?

If yes hit Ctrl-J in Acrobat and see if any javascript errors are generated.

Paul

Avatar

Level 4

Wouldn't the "<0" in the script never be true? Maybe try this revised script:

if  ((form1.Page1.List_A.rawValue>0) &&  (form1.Page1.List_B.rawValue>0)  &&  (form1.Page1.List_C.rawValue>0))

     {
     Field.presence = "visible";

     }

     else

     {

     Field.presence = "invisible";

     }

Jo

Avatar

Level 7

Here is my solution:

if  ((form1.Page1.List_A.rawValue==null) || (form1.Page1.List_B.rawValue==null)  || (form1.Page1.List_C.rawValue==null)
     )

{
Field.presence = "invisible";

}

else

{

Field.presence = "visible";

}

Thanks everyone for your help