These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

how to find xfa subform field type e.g is it a text field

JGarn23
Registered: Feb 17 2010
Posts: 35
Answered

I want to be able to test all fields in an XFA subform to see what kind of fields they are.

I found the code below on the forums that cycles through nodes in a subform and prints the names of the fields. I'd like to cycle the nodes and work out which are text fields, checkboxes etc so I can then reset them all to blank. Can someone tell me how?

Thanks.

var oNodes = mySubForm.nodes;
var nodesLength = oNodes.length;
for (var i = 0; i < nodesLength; i++) {
xfa.host.messageBox(oNodes.item(i).name)
}

StevenD
Registered: Oct 6 2006
Posts: 368
I don't know if this will help or not but I had a similar question and you can read the answer in another post.

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=22636

StevenD