Hello, i'd like to know if anyone can help me.
I'm attempting to create a PDF Form, with simple enough conditions.
I'm making Drop-Down List box that connect to XML(www.blaHBLAH.COM/blahblah.xml). That is, that the drop-down list be populated from the XML.
Additionally i want to create several more boxes(text, perhaps?) that if, for example, i choice in the Drop-Down list box a choice called A. this texts go to the xml and find its corrosponding numbers, that is lets for example that choice A makes another box represent the Number 1.
Question is ...how do i do that?
Please help me if i can.
You can do this but you may not be able to load the XML from a web URL. If the XML is an output of a WSDL call, then you may be able to.
You can traverse thru the XML nodes using xfa.resolveNode method.
The below code gives you the value of a node two levels deep from the root node. You can use this idea to traverse thru your XML nodes to get the specific value.
well, i've tried for last day or so to load local XML. It loads the catagories right but when i try to take..lets say "Programs" and load them to drop-down list from it to draw the 'programs', it doesn't load nothing...and i can't seems to figure out why.
The form that you are using does not support Dynamic content on the form. This is because the form was a document to PDF form. In that scenario, LiveCycle treats the form as an Image and allows to be saved only Static PDF form.
The population of the dropdown from the XML with the properties needs dynamic binding which can not be done with your form.
You have two options.
1) Re develop the form in LiveCycle Designer so it can be saved as Dynamic PDF and will enable the dynamic bidnings for you.
2) Write code manually to load the dropdowns from XML data.
Place the following code in the initialize event of the dropdown to get it populated.
var oSubform = xfa.resolveNodes("$record.maslul[*]");
var oNode = xfa.resolveNode("$record.maslul[" + i + "]");
In the form, you had created a data connection to the form with the XML.
Then you had also added the XML data file to the Preview property. That means when you Preview your form in the Designer, the data from XML will be loaded to the form based on the bindings done to the fields.
In your case, you wanted the dropdown to be filled with values from the XML. So I asked you to place the code in the initialize event of the dropdown, so it will read the XML data and add values to the dropdown.
Hope this helps.