Open a link entered in another form field
We have an Adobe form with a couple of field where the user can copy/paste a link to either a website or a document on a shared folder (sharePoint).
Most users only have adobe reader, so attching the links or attachments to the PDF form does not work. We ask them to copy/paste the link into a couple of fields.
Is it possible to have validation in the acual field (maybe RegEx) where the user enteres (or pastes) the link and format the string as a link, that the recipients of the for simply can click on the link to get to the document(s).
Alternatively, I would like to have a button for the user to click and open the website or file rather than having to copy/paste the link out.
I have a simple code:
// get the link in the field
var Link1 = this.getField("SummaryDescription");
// check field value
app.alert(Link1.value, 2);
app.launchURL(Link1.value);
The alert shows the correct link as entered in the form field.
The links (websites/sharepoint location) entered however don't open.
If I enter: www.adobe.com in the form field, the link in the web browser is: file:///C:/Users/xxxxx/Desktop/www.adobe.com
When I enter www.adobe.com/ or https://www.adobe.com/ the link in the browser is: https://www.adobe.com/%0D%20%0D%20 > 404 (adobe.com)
How can we prevent for the additionl parts at the start or end of the link to be added?
Any assistance would be greately apprechiated.
Many Thanks 🙂
