Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Hiding and Showing Tables with Drop Down Menu

$
0
0

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)

 

//Firsthideallfields

form1.Test1.YES.presence="hidden";

form1.Test1.NO.presence="hidden";

 

//Thentheifstatement

if(this.rawValue=="Yes"){

form1.Test1.YES.presence="visible";

}

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

form1.Test1.NO.presence="visible";

}

 

Sample.PNG

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:

Adding:

 

this.disableAll;

 

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.

 

Cheers,

D


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>