Skip to main content
JR Boulay
Community Expert
Community Expert
December 5, 2020
Answered

Custom format script trigger

  • December 5, 2020
  • 3 replies
  • 824 views

Hi experts

 

I have a form in which a custom format script is triggered when the document is opened, which causes some fields to be reset unwanted.
According to the documentation the custom format script is a user event, which should only be triggered when the field is activated.
See: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/index.html#rhhlterm=processing&rhsyns=%20&t=Acro12_MasterBook%2FJS_API_AcroJS%2FForm_event_processing.htm

 

Question: is it a bug or a normal and expected behavior?
I could possibly share the file privately (it's a client's file).

 

Thank you

This topic has been closed for replies.
Correct answer try67

I want to correct my reply from above. Format scripts are triggered, it seems, when the file is opened, although it's counter-intuitive.

3 replies

JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
December 6, 2020

There is nothing that change any value in my startup JavaScript…

Acrobat does it but not Foxit, it drives me crazy!

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
December 6, 2020

Can you share your file?

JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
December 7, 2020

Thank you

Acrobate du PDF, InDesigner et Photoshopographe
JR Boulay
Community Expert
JR BoulayCommunity ExpertAuthor
Community Expert
December 5, 2020

Thank you.

So Foxit Reader has a different behavior than Acrobat Reader since it doesn't trigger custom format scripts on opening.

I spent a lot of time figuring out which of the two was bugging (my client's agents use both).

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
December 5, 2020

Format scripts are not normally triggered just by opening the file. They are triggered when the value of the field changes.
So unless you use a script to change the value of the field when the document is opened, that should not happen.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
December 7, 2020

I want to correct my reply from above. Format scripts are triggered, it seems, when the file is opened, although it's counter-intuitive.

Bernd Alheit
Community Expert
Community Expert
December 5, 2020

This is normal when the value has changed. To display the value in the field it must formatted.