Auto Filling form with PDF file name issue

New Here ,
Apr 30, 2021 Apr 30, 2021

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

TOPICS
PDF forms

Views

79

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Apr 30, 2021 Apr 30, 2021
Use a script at document level, not field level.  

Likes

translate

Translate

Translate
Adobe Community Professional ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

Use a script at document level, not field level.

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2021 Apr 30, 2021

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

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

Figured it out my field name was wrong, but thanks for the helping hand, greatly appreciate it!

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines