Continuing my previous thread: http://forums.adobe.com/thread/509314?tstart=0
I'm now working on another form requiring this same type of function, but there's a new wrinkle.
How can I substitute fields if one of the fields to be used is blank or is a certain selection of a drop down ...
i.e. If fieldA = "other" use fieldB in place of fieldA in save as title.
Thanks for any help / suggestions!
Views
Replies
Total Likes
Hi,
You would just need an if statement in the .js file, for example
if (event.target.xfa.resolveNode("form1[0].Log[0].fieldA[0]").rawValue == "other")
{
var vDate1 = event.target.xfa.resolveNode("form1[0].Log[0].fieldB[0]").rawValue.toString();
}
else
{
var vDate1 = event.target.xfa.resolveNode("form1[0].Log[0].fieldA[0]").rawValue.toString();
}
The example will not work, as the full name of the two fields will not match your form. Just change the fieldA and fieldB to match your form.
The .js will need to be changed. You will need to make sure that the full reference matches your form exactly: form1.Log...
Good luck,
Niall
I'm running into a problem here.
The js file from my first thread works fine for that form.
However, I've created a second folder js file for this form. When the click event "event.target.myTrustFunct(event.target);" fires it attempts to use the first js file and thus does not work seeing as content and field names are different.
How can I distiguish between what js file I'm trying to pull from for each trusted function?
Any help is appreciated.
Thanks.
Views
Replies
Total Likes
Thanks for the help. I worked out a few minor scripting errors on my part and it's now working perfectly.
Message was edited by: jhcarrell
Views
Replies
Total Likes
Hi, I have a bit of an issue here concerning the js file. It is needed to add the js file within the folder C://Program Files/Adobe/Acrobat9.0/Javascripts/...
The computers which this PDF will be distributed too needs an Administrator password to add any file within program files or windows folders...
It is impossible to add a file into those folders, so I really need a way if possible to have this trustedFunction within the PDF document and make it work
It is unfortunate because there is no problem running this file at home..
Because of the Adminstrator Authority I am restricted to what I can do,
so if there's a way to make it work I'd like to know
Thanks!
Robert
Views
Replies
Total Likes