Hello All,
I'm pretty new to creating forms in LiveCycle, and just started dabbling with the XML side. What I am trying to accomplish is populating a drop-down list based on the selection from a prior drop-down list.
I found a document in the help files that describes exactly what I want to do using the following xml:
Views
Replies
Total Likes
Normally XML like that is returned from a web service call that is made by the form. If you intend on laoding it when the form is loaded then you are asking your users to import it (this can be automated to a point) but the user will have to choose the file. You might find it better to hardcode your values into the form if you do not have an external data source (like a web service call) that will supply this information. If you look at the Dynamic Interactive Purchase Order sample that ships with th eproduct you will see this done with arrays in Javascript for the countries of USA and Canada, then the Province/State DDlist get spopulated with the appropriate values.
Hope that helps
Paul
Ok, I finally got this working, but I ran into another odd issue once it started working.
1. I created a .xml file tailored to the fields on my form and the list items I needed.
2. Created a new data source pointing to the xml file, and set my preview settings to the xml file.
3. Linked the fields to their appropriate data sources.
-At this point it still was not working.
4. I went back and added the <?xml version="1.0" encoding="UTF-8"?> line to the beginning of my xml file.
-All the drop downs started working and populate as intended.
Here is where it went wrong. My form has two drop-downs from which I pull data, "Model" the main list, and "Model Sleeve" which populates based on the first. All of a sudden, the field title next to the "Model" drop-down is gone in the PDF preview, there is just a white space where it should say "Model". Both the caption and binding name fields are labeled "Model".
Here is an example of my xml.
<MyData>
<Model/>
<Models>
<item uiname="Drop down 1 item" token="REE"/>
</Models>
<ModelSleeve/>
<REE>
<item>option1</item>
<item>option1</item>
<item>option1</item>
</REE>
</MyData>
Thanks for the assistance.
Zak
Views
Replies
Total Likes
I decided to go the javascript route from the sample you mentioned. Everything is working great now, thanks for the help.
Zak
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies