How to Add Selectable Electronic Stamps to a PDF Form
Question details
The user needs to provide a way for respondents to select one of two long text messages to place at the end of a fillable PDF form, as standard combo boxes do not display lengthy text properly.

- Product
- Adobe Acrobat PDF
- Device & OS
- not provided
- Scenario
- Creating a fillable PDF form where users must select between lengthy standard messages to be appended to the document.
- Observed behavior
- Standard combo boxes truncate or fail to properly display long text options, requiring a script-based solution to dynamically insert the chosen long message.
Ensure you have access to a PDF editor with advanced form creation capabilities and permissions to execute and test custom document JavaScript.
Use Custom JavaScript to Populate a Read-Only Text Field
Implement a script that prompts the user to select an option and automatically fills a read-only text box with the full, lengthy message.
Because standard PDF combo boxes do not support long paragraphs elegantly, the best workaround is separating the selection mechanism from the display mechanism.
By utilizing Acrobat JavaScript (AcroJS), you can present the user with a customized dialog or popup menu. Once an option is chosen, the script pushes the full text string into a spacious, read-only text field formatted for multiline display.
Open your document in Form Editing mode. Add a new text field at the end of your form, check the 'Multi-line' option in its properties, and set it to 'Read Only'.
Insert a button or a small dropdown menu that will act as the trigger for the user to make their selection.
Right-click the trigger element, go to Properties, navigate to the 'Actions' tab, select 'Run a JavaScript' as the action, and click 'Add'.
Input a script utilizing `app.popUpMenuEx` to show the short titles of the two stamps. Based on the user's selection, assign the corresponding long text string to a variable.
Conclude the script by setting the `value` property of your read-only multi-line text field to the variable containing the chosen long message.
Use JavaScript to Apply a Text Watermark or Comment
Alternatively, use a script to stamp the selected text as a watermark or an annotation directly onto the page canvas.
Easily Add Stamps and Edit PDF Forms with WPS Office
Instead of relying on complex JavaScript for document stamping, you can use WPS Office's built-in PDF tools to quickly insert custom stamps, text boxes, and edit fillable forms natively without writing a single line of code.
- 1. Open the PDF document: Launch WPS Office and open your fillable PDF file.
- 2. Navigate to the Comment tab: Click on the 'Comment' tab located on the top ribbon menu to access the annotation tools.
- 3. Select the Stamp tool: Click on the 'Stamp' icon. You can choose from predefined standard stamps or click 'Click to Add' to create a custom text stamp containing your long message.
- 4. Place the stamp on the page: Click anywhere on the document where you want the long message to appear. Drag the corners to resize it or move it to the desired position.

Frequently Asked Questions
Can I use standard combo boxes for long paragraphs in a PDF form?
Standard combo boxes in PDFs are typically designed for short text selections. Long paragraphs may not display fully or properly wrap within the dropdown menu, which is why a read-only text field populated by a script or a custom stamp is recommended instead.
Will Acrobat JavaScript work in all PDF viewers?
No, custom JavaScript (AcroJS) is primarily supported by Adobe Acrobat and Adobe Reader. Third-party PDF viewers, mobile apps, or browser-based PDF readers often have limited or no support for executing complex document scripts.
Is there a way to add custom stamps without writing JavaScript?
Yes, most modern PDF editors, including WPS Office, feature a built-in 'Stamp' tool. This allows you to manually create and place custom text or image stamps anywhere on the document visually, without requiring any coding knowledge.




