Is there any way to have a text field populate with the pdf's file name?
Example - File name - Incident-11223.pdf
When the user opens the PDF, Text Box 1 has "Incident-11223" pre filled in.
Thanks
Solved! Go to Solution.
Hi,
Try this one. In the docReady event of the TextField put this script.
this.rawValue = event.target.documentFileName;
Thanks.
Bibhu.
Views
Replies
Total Likes
Hi,
Try this one. In the docReady event of the TextField put this script.
this.rawValue = event.target.documentFileName;
Thanks.
Bibhu.
Views
Replies
Total Likes
Awesome, That works really well.
I found this on the forum based on your answer.
Puts the file name in the field and takes off the .pdf extention.
var
fileName = event.target.documentFileName;
//removing the file extension
var
vDot = fileName.length-4;
//apply the value to the TxtField
this.rawValue
= fileName.substring(0,vDot);
Views
Replies
Total Likes
I found the Javascript to remove the File Extention from another post on the Forum.
It is working great, thank you very Much!
var
fileName = event.target.documentFileName;
//removing the file extension
var
vDot = fileName.length-4;
//apply the value to the TxtField
this.rawValue
= fileName.substring(0,vDot);
Views
Replies
Total Likes
Views
Likes
Replies