Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Can users insert hyperlinks into text fields?

maestrodog1
Level 4
Level 4

LC ES2 9.0.0

I'd like end users of pdf forms to be able to insert working hyperlinks into text fields.  Can this be done?  I tried to create a text field in a form, but the hyperlink only reads as text and not as an active link.  Is there a setting, or special type of field somewhere, either in LC ES or in Acrobat Reader to turn on so this is possible?

3 Replies
Srini_Dhulipall
Level 10
Level 10

In the TextField properties, set the "Field Format" to Rich Text.

And in the preview, press CTRL+E to enable the floating formatting menu. You can see hyperlink as one of the option.

Thanks

Srini

maestrodog1
Level 4
Level 4

This sort of works but it's a very clumsy workaround for an end user...first you paste the link text into the field, then you have to highlight the text, then CTRL +E, then you have to paste the text into the resulting window.  And then you can't just click the hyperlink to open it, you have to right-click and select "Open Hyperlink."

A five-step process to get a link pasted in so that it can work, and then you have to do something non-intuitive to open it; not really user friendly.

I did actually find another resource where you can put a button next to the text field that will change the adjacent field to a hyperlink, you can find it here:

https://acrobat.com/#d=neX6n8Ohz5O7oztjG7mkUQ

joflo723
Level 4
Level 4

Reviving this because I was wondering...how would you link to a folder on a network drive?

The example posted by maestrodog1 is very helpful, but it provides a button that when clicked, links to an internet URL.

if (xfa.host.name != "XFAPresentationAgent")

    {

    var oURI = xfa.resolveNode("form1.page1.header.TextField2").rawValue;

    var oLink = "<body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\"><p style=\"letter-spacing:0in\"><a href=\"" + oURI+ "\" style=\"margin-top:0pt;margin-bottom:0pt;text-valign:bottom;font-family:'Myriad Pro';font-size:8pt\">" + oURI + "</a></p></body>";

    xfa.resolveNode("form1.page1.header.TextField2").value.exData.loadXML(oLink, false, true);

    }

When I enter a local or network path (for example "Y:\Network\File.doc"), I get the following error message in my browser:

Firefox doesn't know how to open this address, because the protocol (y) isn't associated with any program.

How would you alter this so that it links to a local or network file?

Thanks,

Jo