Avatar

Level 10

You cannot control when the binding happens ...it simply happens when the form is rendered. You can either let the binding happen and hide those fields that you do not want to see or push the value into the dom as you want them to bind (kind of the same thing as setting the fields yourself).

To acess individual items in the dom you would use the command xfa.datasets.data as the the root of the dom. Then you would follow your xml structure to get to the node tha you want. When you want to get the actual value of the node then you would use the value property. Something like this:

Fieldname.rawValue = xfa.datasets.data.form1.Page1.subform1.node.value

Remember that if an xml node has attributes then they will be turned into regular nodes in the dom prefixed by an @. I find it easier to display the dom so you can use the command app.alert(xfa.datasets.data.saveXML("pretty")) to visually see the structure. Or you can dump the contents of the dom into a multiline field so you can scroll through it.

Hope that helps

Paul