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

Adding drop down list to a dynamic stamp

New Here ,
Aug 13, 2020 Aug 13, 2020

I have a stamp that asks the user to enter data into fields.  I would like one of the fields to be a drop down list and the stamp to query the user for which item to show.  How would I get the dropdown list to show?

if ((event.source.forReal)&&(event.source.stampName == "#Invalid_Stamp"))
{
this.getField("Element").value = app.response("Element:");
this.getField("SampleNumber").value = app.response("SampleNumber:");
this.getField("Reason").List.value = app.response("Reason:");


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

}

TOPICS
PDF forms
3.6K
Translate
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
Community Expert ,
Aug 13, 2020 Aug 13, 2020

There's no reason to put a drop-down field on the stamp itself, since the user can't interact with it. You can use a text field.

The drop-down field needs to be in the dialog object where you prompt the user to select a value out of a pre-defined list.

Then you take that selected value and apply it to the field in your stamp.

Translate
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 ,
Aug 14, 2020 Aug 14, 2020
How do you make a dialog object appear when the stamp is placed?
Translate
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
Community Expert ,
Aug 16, 2020 Aug 16, 2020
LATEST

Did you look at the links I posted? It's all explained there.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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
Community Expert ,
Aug 13, 2020 Aug 13, 2020

All of the fields on a dynamic stamp are filled automatically. The user never sees them. All they see is the flattened result on the stamp.  Filling fields interactively requires a popup dialog. For a dropdown you'll need a custom dialog. 

You'll find more info on this here:

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

https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

Here's some info on custom popup dialogs:

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

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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