• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

413

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

Community Expert , Apr 30, 2021 Apr 30, 2021

Use a script at document level, not field level.

 

Votes

Translate

Translate
Community Expert ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

Use a script at document level, not field level.

 

Votes

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

Votes

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

LATEST

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

Votes

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