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

Hide / Show subform based on Drop-down List rawValue?

$
0
0

I have a Drop-down List which has two List Items; List Item 1 | List Item 2

I have a subform beneath it which I want to only be visible when List Item 1 is chosen.

The script I'm using to accomplish this is pasted below which is located in the validate event of the subform:

 

if (this.DropDownList.rawValue == "List Item 1"){    this.presence = "visible";}else{    this.presence = "hidden";}

 

The problem is that putting this in the validate event in the script editor causes validation error popups. If I put the javascript code into the layout:ready event, then the hidden subform will not be flowable (it will behave as if positioned), if I put it in the calculate event then my subform becomes read-only and so on and so forth.

.

How can I make it so that every time the Drop-down List rawValue is changed, the subform will be updated during run time? There must be some javascript that forces all subforms throughout the pdf to run any javascript that is in them for a certain event type (such as layout:ready), or all event types (I dont care). If that is true, then what event should I be using as a best practice? (I have no clue here, total novice).


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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