Skip to main content
Karen Thring
Inspiring
July 28, 2017
Answered

A button with editable text?

  • July 28, 2017
  • 1 reply
  • 1134 views

Hello.

I am creating editable PDF Place Cards with names, tables and meal selections represented by icons which the client clicks through to make their meal selection. All fine. I have simply assembled buttons with hidden/visible in JavaScript. Works great. However, I would like one button to be blank with the ability for the client to type a letter or small word in to represent their choice if the icon is not present for example V for Vego. I have tried a text field to no avail. Is their anyway to create a button just like the icons but with the ability to edit the text? I use Acrobat XI. Clients edit with latest Adobe Reader. Thank you in advance!

Karen

This topic has been closed for replies.
Correct answer try67

Yes, that's possible.

As the button's MouseUp event enter this JavaScript code:

event.target.buttonSetCaption(app.response("Enter the new text for this button:","",""));

Edit: Code fixed...

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 28, 2017

Yes, that's possible.

As the button's MouseUp event enter this JavaScript code:

event.target.buttonSetCaption(app.response("Enter the new text for this button:","",""));

Edit: Code fixed...

Karen Thring
Inspiring
July 28, 2017

Thanks so much for that, the only issue with this is that it does not give blank button if desired and text size cannot be changed through Rich Text. I wish I could attach an example because I am not sure I am being very clear. Basically, i want it to function as either a blank button or the client can type a letter into it such aS "V" large for Vego or they can make the text smaller and put a word eg 'Pasta".

Best,

Karen

try67
Community Expert
Community Expert
July 28, 2017

For that you have to use a text field with the Rich Text Formatting option enabled.