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

Script attached to an open page event to set focus to a form field fails to perform as intended

Engaged ,
May 13, 2024 May 13, 2024

Copy link to clipboard

Copied

For those adept at creating interactive PDF forms who are also well versed in JS, I am sure most would agree that setting focus to a form field when changing pages on a PDF form is very basic requiring a simple 2-line script attached to an open page event In reality, if the script provides the correct syntax and spelling, it should perform as intended without issue.  However, I seem to have run into a connundrum using the same methodology to set focus to a form field on a page added to an interactive PDF form using the template spawn method whereby the aforementioned methodology failed to perform as intended. In short, once the page had been generated/added to the form instead of ending up on the form field set to focus on the spawned page the form reverted to the form field set to focus on the previous page. Furthermore, I was unable to navigate to the spawned page from the previous page whereby my attempting to do so ended up with the same result, figure? All considered, am I missing somthing to make this work or does setting focus to a form field using a script attached to an open page event required to be a page that doesn't serve as a template? If the answer is something simple, I must admit that I am embarassed to have posted this question. Thank you ahead of time.  
     

TOPICS
Create PDFs , General troubleshooting , How to , JavaScript , PDF , PDF forms

Views

136

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
Engaged ,
May 16, 2024 May 16, 2024

Copy link to clipboard

Copied

LATEST

Given a lack of responses to my initial post, it comes as no surprise given what I now believe caused the issue using the 'setFocus' method in one of my interactive PDF forms. Come to learn given a copy of the interactive PDF form referred to in my initial post using the 'setFocus' method, the method  performed  exactly as intended in the copy. This being the case, I can only surmise that for whatever reason, the isssue was more then likely due to a corrupted PDF form. However, what's surprising is that the interactive PDF form exhibiting the problem performed exactly as intended for all the remaining scripts, Figure?  IMO, this goes to show that a corrupt PDF form/file doesn't necessarily have to fail to open/perform in some respect as intended if and when the PDF file is corrupt. 

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