Hiding and Showing Tables with Drop Down Menu

3dMania 03-02-2017

Im trying to learn how to hide and unhide tables/subforms using the selection from a drop down menu. Here is the code I was using attached to the drop down menu which I pulled from a previous post...but when I open the PDF and make a selection in the drop down menu I get a validation error message:

The value you entered for Drop-down List is invalid.

If you click OK it still unhides the table you selected in drop down. How do you edit the following to stop the error messages from popping up when a user makes a selection.

Here is the code I was using:

form1.Test1.DropDownList1::validate - (JavaScript, client)








else if(this.rawValue=="No"){




The above image is a sample of what I have using Adobe LiveCycle to develop. I basically have a DropDownList which has the option Yes or No. And then I have 2 subForms

YES - Table and info needed

NO - Table and info needed

As I mentioned using the code provided in this earlier post I have this working but I just have an error message popping up.

**** We did find a solution but don't know if it will cause other problems later or why we were getting the error in the first place. Adding:



At the end of the script....we don't get any error messages but again if anyone can explain why the messages were popping up to begin with that would be great.

Any help would be great.



Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (1)

Answers (1)



use a script in the exit event instead of the validation event.

switch (this.rawValue) {

  case "Yes" :

  YES.presence = "visible";

  NO.presence = "hidden";


  case "No" :

  YES.presence = "hidden";

  NO.presence = "visible";


  default :

  YES.presence = "hidden";

  NO.presence = "hidden";


You also shoud set the presence of the subforms initially to hidden.