Skip to main content
Participant
February 16, 2024
Question

Dynamic stamp with dropdown for accounts and todays date

  • February 16, 2024
  • 2 replies
  • 1327 views

Hello:

I am brand new to this.................. I'm trying to develop a script for a dynamic stamp that will create a popup dropdown list of accounts to be inserted into the "Account" field of my dynamic stamp, along with also populating the "Date" field with the current date. Could anyone help me with this? If someone could post script that just says something like "Account 1" "Account 2" etc., I can change the account names myself. Thanks so much! Below is what I have so far, but it only gives a blank "Account" popup. I have no idea how to make a dropdown list. I have also attached my template. Thanks again!

{

this.getField("Account").value=app.response("Account:");

this.getField("Date").value=util.printd("mm/dd/yyyy",new Date());

}

2 replies

Thom Parker
Community Expert
Community Expert
February 16, 2024

The type of scripting you're asking about is more complex than you think. You will need to either learn how to do this yourself, or hire a developer.  

Here are some things to look at:

https://www.pdfscripting.com/public/images/Video/PDFStampsGoneWild_mp4.cfm 

https://www.pdfscripting.com/public/ACRODIALOGS-OVERVIEW.cfm

https://www.pdfscripting.com/public/All_About_PDF_Stamps.cfm

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
February 16, 2024
I'm trying to learn how to do it myself... Thats why I'm here. 🙂

Joshua Wheeler, MSEd
Director of Transportation
Winthrop Public Schools
17A Highland Avenue
Winthrop, Maine 04364
207-377-2296
jwheeler@winthropschools.org
Thom Parker
Community Expert
Community Expert
February 16, 2024

So the first thing to do is learn about scripting PDF forms, since stamp scripts are basically specialized form scripts. 

https://www.pdfscripting.com/public/PDF-Form-Scripting.cfm

 

Custom Dialogs are a different kind of animal.  They require a good knowlege of Core JavaScript.  

You'll find some help on this forum, here's a simple search. Not all of the results are about coding custom dialogs. 

https://community.adobe.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&q=Acrobat%20Dialog

 

Here's the Acrobat JavaScript Reference Entry:

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#execdialog

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
Community Expert
February 16, 2024

For this you must create a dialog.

Participant
February 16, 2024
Ok, how do I do that?

Joshua Wheeler, MSEd
Director of Transportation
Winthrop Public Schools
17A Highland Avenue
Winthrop, Maine 04364
207-377-2296
jwheeler@winthropschools.org