Copy link to clipboard
Copied
Hi I'm trying to create an job approval PDF form, and would like a form that auto fills with the file name, I have created a master form that people duplicate and then rename with Job Number/Description/Amend Stage. I have some javascript that pulls in the name once.
var name = this.documentFileName name = name.substr(0, name.lastIndexOf('.')); event.value = name;
But when you duplicate, rename and open the PDF it wont pull in the new file name. Any ideas?
Many thanks
Use a script at document level, not field level.
Copy link to clipboard
Copied
Use a script at document level, not field level.
Copy link to clipboard
Copied
Thankyou so much that makes sense, but then how do I link the document level Javascript to a form, forgive me its my first journey into Javascript
Copy link to clipboard
Copied
Figured it out my field name was wrong, but thanks for the helping hand, greatly appreciate it!