Hi,
I want to get all (unsigned and signed) signature fields.
I try do something like this:
function GetAllSignatureField(){
var numFields = xfa.numFields;
app.alert(numFields);
for (var i = 0; i < 2; i++){
app.alert(xfa.getNthFieldName(i));
if(xfa.getNthFieldName(i).type=="signature"){
// is signaturefield...
}
}
}
The firtst alert show me undefined and after that, secod alert write to console TypeError: xfa.getNthFieldName is not a function.
Do you know where is problem? In javascript reference there write this.numFields and this.getNthFieldName(i). I create dynamic
form. I tryed using this.numFields, xfa.numFields and xfa.host.numFields. Everytime it do same.
Thanks Jakub.
Views
Replies
Total Likes
Hi,
In Javascript you will need to resolve the node of each iteration of the loop. Something like this:
for (var i = 0; i < 2; i++){
var currentObject = xfa.resolveNode("yourfieldname[" + i + "]");
app.alert(currentObject);
if(currentObject.type=="signature")
There is some examples of SOM expressions here: http://assure.ly/kUP02y.
I haven't checked the syntax of the signature script, but this might help: http://assure.ly/m8mN0m.
Hope that helps,
Niall
Views
Replies
Total Likes
There is some problems with this solution. I need universal function where arent path of fields.
Sou I am not able to use something like that
"yourfieldname[" + i + "]"
I did function, which walk thru all nodes and find signature.
If I had some node, then if I do node.type return "undefined".
If I do node.rawValue, it return real rawValue (e.g. "James" for field Firstname).
Is there some reason, why I cant use node.type?
Is some other solution?
Thanks Jakub.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies