Dynamic stamp data entry

New Here ,
Dec 20, 2017

Copy link to clipboard

Copied

I've created a dynamic stamp that has two fields for the user to enter data.

The stamp and javascript code seem to be working correctly except that I

get prompted twice for the data entry, once when selecting the stamp and

again when placing the stamp. I found a work-around; if I enter the data on

the first prompt and then 'cancel' on the second prompt the stamp gets placed

and the data shows correctly. This is the code I'm using for one of the fields:

var cResponse = app.response({

cQuestion: "Enter the Dates to appear in the stamp.",

cTitle: "Dates",

cLabel: "Dates"

event.value = cResponse;

I'm using the code from some examples I found. The other thing that would

be nice is to combine the two field prompts into one prompt for the data entry.

Regards,

Mike

TOPICS
Acrobat SDK and JavaScript

Views

1.2K

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Adobe Community Professional , Dec 20, 2017
Thom Parker Adobe Community Professional , Dec 20, 2017
You're missing a gating if for only running the code when it's being placed. If you don't have this code you'll get the prompts every time any stamp is selected.You'll find everything you need to know about stamps here:PDF Stamp Annotations Here's an early article on creating advance dynamic stamps. It also includes the gating code you need, which relies on the stamp name, which is explained in the article:https://acrobatusers.com/tutorials/dynamic_stamp_secrets For combining the response dialog...

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Dec 20, 2017

Copy link to clipboard

Copied

You're missing a gating if for only running the code when it's being placed. If you don't have this code you'll get the prompts every time any stamp is selected.

You'll find everything you need to know about stamps here:

PDF Stamp Annotations

Here's an early article on creating advance dynamic stamps. It also includes the gating code you need, which relies on the stamp name, which is explained in the article:

https://acrobatusers.com/tutorials/dynamic_stamp_secrets

For combining the response dialogs you need to use a dialog. Here is a dialog creation tool for Acrobat JavaScript:

ACRODIALOGS OVERVIEW

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
mike70173457 AUTHOR LATEST
New Here ,
Dec 21, 2017

Copy link to clipboard

Copied

Thank you Thom.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Engaged ,
Dec 20, 2017

Copy link to clipboard

Copied

Hi Mike,

In order to have multiple input fields (or check boxes, pulldowns, radio buttons, etc) entered at once in a custom dynamic stamp you need to use a custom dialog.  Coding a custom dialog is an advanced task but there is an online dialog designer that makes the job much easier than hand coding- ACRODIALOGS OVERVIEW

There are examples of custom dialogs used with stamps in the video PDF Stamps Gone Wild so you can see how they work.  That video can be found at-

PDF Stamp Annotations

Hope this helps,

Dimitri

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Dec 21, 2017

Copy link to clipboard

Copied

Thank you Dimitri.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more