I have a document in Adobe Livecycle Designer where I have multiple text fields named "Jahr1". They are scattered throughout the whole document.
Now I want to change the value of all those fields. For this I need to find all text fields with name "Jahr1". I tried that like so:
var nodes = xfa.resolveNodes("Jahr1[*]");
and also like this:
var nodes = xfa.resolveNodes("Jahr1");
But nodes
remains empty.
Any ideas?
form1.Subform2.Jahr1[0]::initialize - (JavaScript, client)
// Access a field property using a field name.
// Change the field properties of a specific subform.
// Use the [] operator to access an object's property.
// First, get the subform nodes.
var oNodes = Subform2.nodes;
var nNodesLength = oNodes.length;
// Loop through the subform's nodes and look for fields.
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount ++) {
// Set the field property.
if (oNodes.item(nNodeCount).name.substr(0,5) == "Jahr1") {
oNodes.item(nNodeCount).rawValue = nNodeCount;
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.