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

How to add hyperlink to pdf rich text box (with javascript)

Guest
Jun 10, 2016 Jun 10, 2016

I populate a (rich) text box based on a drop down value. would be great if I could add a hyperlink to it based on the drop down value. Is there a way to add hyperlinks annotations via javascript when a drop down value is chosen? If not, is there another type text box or object I can add the text and/or hyperlink to?

thx for your help

TOPICS
Acrobat SDK and JavaScript , Windows
1.8K
Translate
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 ,
Jun 10, 2016 Jun 10, 2016

It's only possible to add hyperlinks in a rich text field manually. It's not possible with a script.

You can, however, set the enter field to act as a link when clicked, but I'm not sure that's what you're after...

Translate
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
Guest
Jun 10, 2016 Jun 10, 2016

Thx for the quick response

For testing purposes in the (rich) text field, when I enter a default value (ex: https://www.google.ca ) it only shows as text and not a clickable link, so I'm not sure how "you set the enter field" as you say, to act like as a link. Perhaps I'm not setting the correct properties.

Text field properties:

Multi-line - checked

Scroll Long text - checked

Allow Rich Text Formatting - checked

Translate
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 ,
Jun 10, 2016 Jun 10, 2016

I meant to write "set the entire field".
To do that go to Actions and then add a Mouse Up trigger with an "Open a web link" action.

To set part of the text as a clickable link select that text using the mouse and then press Ctrl+E. This will open the Properties Bar.

Then click the More button and you'll be able to do it under the Link tab.

Translate
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
Guest
Jun 10, 2016 Jun 10, 2016

ahhh, yes, ok

I've done that before, and that does work

Would have been nice to have that create a javascript action entry... oh well...

thx for the clarification 😉

Translate
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 ,
Jun 10, 2016 Jun 10, 2016
LATEST

I agree with you there... You can make a feature request here, if you wish: Feature Request/Bug Report Form

Translate
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