How to Control the Prompt Order in Acrobat Dynamic Stamps
Question details
The user wants to control the sequence of JavaScript prompts for multiple text fields within a dynamic stamp.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating or editing dynamic PDF stamps containing multiple text fields that require user input via sequential JavaScript prompts.
- Observed behavior
- The prompt dialogs appear in an unpredictable or random order instead of the logical sequence defined by the user.
Ensure you have access to the 'Prepare Form' tools in your PDF editor and have created a backup copy of your original dynamic stamp file.
Consolidate Prompts in a Single Master Script
Place all Javascript prompt calls within one script to strictly define their execution order, rather than attaching separate scripts to individual fields.
When individual scripts are placed on separate text fields, the PDF reader triggers them based on an internal calculation order that can be unpredictable. By gathering all inputs in a single script on the primary field, you force the application to ask the questions in the exact sequence written in your code.
Launch your PDF editor, open the dynamic stamp PDF file, and enter the 'Prepare Form' mode to access the form field properties.
Right-click your text fields, select 'Properties', navigate to the 'Calculate' tab, and delete any existing app.response scripts from the individual secondary fields.
Select the first text field (the one that should trigger the sequence). In its 'Calculate' tab, choose 'Custom calculation script' and click the 'Edit' button.
Write a consolidated script that calls the prompts in your desired order. For example: var ans1 = app.response('Question 1', 'Title'); var ans2 = app.response('Question 2', 'Title');
In the same script block, directly assign the collected responses to their respective fields using code like: this.getField('Text2').value = ans2; Then save your changes.

Adjust the Form Field Calculation Order
Modify the document's internal calculation order so that scripts attached to individual fields are evaluated in your preferred sequence.
Add and Manage Stamps Easily with WPS Office
Skip the complicated JavaScript coding. WPS PDF provides a user-friendly interface to quickly add, create, and manage custom stamps for all your document workflows without any programming knowledge.
- 1. Open your PDF: Launch WPS Office and open your PDF document.
- 2. Access the Stamp Tool: Navigate to the 'Comment' tab on the top ribbon and click the 'Stamp' icon.
- 3. Create a Custom Stamp: Select 'Custom Stamp' from the dropdown menu to upload your own image or design.
- 4. Apply to Document: Click anywhere on the PDF page to place your newly created stamp instantly.

Frequently Asked Questions
Why do dynamic stamp prompts appear randomly?
Form fields in a PDF are calculated based on an internal calculation order, not necessarily the visual order or the order in which they were created. If scripts are placed on individual fields, they trigger according to this internal hierarchy, causing prompts to appear out of sequence.
Can I use dynamic stamps without writing JavaScript?
Yes, basic dynamic stamps (such as those incorporating the current date, time, or user name) often have built-in templates that don't require coding. However, triggering custom dialog boxes for user input specifically requires JavaScript.
Where are custom dynamic stamp files saved on my computer?
Custom stamp PDFs are typically stored in the user's hidden AppData roaming directory. In Windows, this is usually found under C:\Users\[Username]\AppData\Roaming\Adobe\Acrobat\[Version]\Stamps.




