PDF Editing Issues

Create PDF Buttons That Show Different Messages in Adobe Acrobat

Jason MillerJason Miller Nov 19, 2026 869 views

Question details

Create PDF form buttons that display different messages when clicked.

Create PDF Buttons That Show Different Messages in Adobe Acrobat
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A PDF form needs separate buttons that each show a specific message or value.
Observed behavior
Clicking a button should update a text field with its assigned message or show a temporary alert.
Before you start

Open the PDF in Adobe Acrobat and check that you can access the Prepare a form tool. Decide whether messages should remain visible in a text field or appear temporarily in an alert.

Solution 1Recommended

Update a text field with each button's message

Use this method when the selected message should remain visible on the PDF form.

1
Add a text field

In Acrobat, open All tools > Prepare a form, add a text field, and name it Text1.

2
Add or select a button

In Prepare a form, add a button or right-click an existing button and select Properties.

3
Add the JavaScript action

On the Actions tab, select Mouse Up as the trigger and Run a JavaScript as the action. Click Add and enter: this.getField("Text1").value = "Message for Button 1";

4
Configure the other buttons

Open Properties > Actions for each remaining button and add its own Mouse Up JavaScript action. Use the same Text1 field name but change the message in each script.

5
Test the form

Click Preview in Prepare a form, then click each button and confirm that Text1 displays the expected message.

Update a text field with each button's message
Check PDF viewer support: The script depends on a viewer that supports PDF JavaScript and allows it to run. Test the saved PDF in the viewer your audience will use.
Free Microsoft Office alternative

Work with PDFs and Office files in WPS Office

WPS Office is a free, lightweight alternative for everyday document work, with a familiar interface and support for common Office formats to make migration easier. Use Acrobat for the PDF button JavaScript described above; WPS Office is not a replacement for that configuration.

Open and view PDF documents alongside other office filesCompatible with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXFamiliar interface for working across documents, spreadsheets, and presentationsFree, lightweight option for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Can all buttons write to the same text field?

Yes. Give each button a Mouse Up JavaScript action that refers to the same field, such as Text1, and assign a different message in each script.

Why does clicking a button do nothing?

Check the button's Properties > Actions tab for a Mouse Up action set to Run a JavaScript. Also verify that the field name in the script matches the text field name and that your PDF viewer allows JavaScript.

How do I display a message without adding a text field?

In the button's Properties > Actions tab, add a Mouse Up action that runs JavaScript such as app.alert("Your message");.

Will the buttons work in every PDF viewer?

Not necessarily. PDF viewers differ in their support for form JavaScript and may block it for security reasons. Test the saved file in the intended viewer.