Not all features are available in JavaScript.]]>
Thu, 06 Sep 2018 09:53:21 +0000http://forums.planetpdf.com/add-a-working-hyperlink-to-rtfenabled-text-box_topic4011_post9323.html#9323http://forums.planetpdf.com/add-a-working-hyperlink-to-rtfenabled-text-box_topic4011_post9320.html#9320
Author: mmitchell_houstonSubject: 4011Posted: 05 Sep 2018 at 5:01pm

BAlheit wrote:

spans doesn't have a hyperlink property.

Yup. I figured that out.

QUESTION: If the RTF field allows me to copy/paste a working URL into it (or I can use the Text Property Editor to add one), how does that work? Why does it allow me to paste it in if I cannot extract it later?

You might try using the app.launchURL. Carefully read the description and the sections about privileged context. If this form will be distributed to others, then you or they will have to install a special script file in one of Acrobat's/Reader's JavaScript folders.

I am sorry, I should have mentioned that the approaches cited above both work about halfway: the text does move over to the second box, but all the code appears as visible text. It does not work to create a link.]]>
Sat, 01 Sep 2018 23:47:48 +0000http://forums.planetpdf.com/add-a-working-hyperlink-to-rtfenabled-text-box_topic4011_post9314.html#9314http://forums.planetpdf.com/add-a-working-hyperlink-to-rtfenabled-text-box_topic4011_post9313.html#9313
Author: mmitchell_houstonSubject: 4011Posted: 01 Sep 2018 at 11:46pm

Two Questions

Is it possible to programmatically create a working link inside an rtf-enabled text field?

If not, is it possible to create a link in the clipboard memory and then paste it into the field (I know this sounds weird, but since I can copy a working link from MS Word and paste it into the form, I'm wondering if this desperate play might be possible)?

SCENARIO:

txtbox1 = standard text field (text only, no rtf)

txtbox2 = text box with rtf enabled (+ multiline, scrolling, etc.)

btnSubmit = standard button

User will type url into txtbox1

User will click btnSubmit

Javascript will paste url into txtbox2 as a fully working URL that the user can click