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

How can I create a pop-up textbox that pops up when clicking a button in a PDF?

New Here ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

I have a PDF document with mostly text and some images and would like to create buttons for the various sections of the document that trigger text fields to pop up and provide explanatory info about the individual sections when users click on the buttons.

 

Is there a way to do this? I've looked at buttons and their settings but haven't been able to figure it out.

Thank you!

TOPICS
How to , PDF

Views

202

Translate

Translate

Report

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 ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

You could use alert pop for that, as 'Mouse UP' action of a button select 'Run a JavaScript' and add this script:
app.alert("This is the explanatory information for this section.", 3);

Votes

Translate

Translate

Report

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 ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

Cool, yeah that could probably work for me. The title of the window that pops up is "Warning: JavaScript-Window". Do you happen to know if there's a way to change that text?

Votes

Translate

Translate

Report

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 ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

To remove warning you need to run script from privileged context like installing script on your machine (PC) which is not helpful if PDF will be used by other users (they would need to do the same).

You could also create a hidden text field with your message and show/hide it using the button, or use buttons tooltip to show message while mouse hover over button.

Votes

Translate

Translate

Report

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 ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

That sounds like an even better idea, I'll try to figure out how to do that. Thank you!

Votes

Translate

Translate

Report

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 ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

Hmmm I don't seem to be able to figure out how to do this. I have created a text field with an example text. I have created a button. However, I cannot figure out how to (a) make the text field hidden and (b) how to make the button interact with the text field. I can see that one action that the button can trigger is "show/hide field" but there seems to be no way to select the text field for this action. Help would be greatly appreciated, thank you 🙂

Votes

Translate

Translate

Report

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 ,
Sep 04, 2024 Sep 04, 2024

Copy link to clipboard

Copied

When you select show/hide, click on 'add' and then you will be able to select text field.

Or use this script as 'Mouse UP' action of a button:
var f = this.getField("Text1");
f.display = (f.display == display.hidden)? display.visible : display.hidden;

 

Change "Text1" to the name of your text field.

Votes

Translate

Translate

Report

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 ,
Sep 05, 2024 Sep 05, 2024

Copy link to clipboard

Copied

Thank you so much for your reply but it's still not working. I did try clicking "add" but the only thing I can select for adding is the button itself. Nothing else shows up in the list.

 

I wanted to try your suggestion with JavaScript but how do I know the name of my text field? I added a text field to the document but I can't find any option for naming the text field or accessing any kind of properties about it. All I can do is move it around and change the text written in the field.

Votes

Translate

Translate

Report

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 ,
Sep 05, 2024 Sep 05, 2024

Copy link to clipboard

Copied

Can you share your file with us?

Votes

Translate

Translate

Report

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 ,
Sep 11, 2024 Sep 11, 2024

Copy link to clipboard

Copied

LATEST

Unfortunately I can't, but with the help of a colleague I was able to replicate the steps shown in this video:
https://www.youtube.com/watch?v=TZpmM3Fbqcg

 

Anyway, thank you so much for your help 🙂

(SKIP AHEAD to 5:26 to quickly see the crucial settings) In this tutorial we create an interactive PDF with mouse rollovers or popups using Adobe Illustrator and buttons in Adobe Acrobat Pro. View Text Version of the Tutorial here: ...

Votes

Translate

Translate

Report

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