How to Make User-Entered URLs Clickable in Acrobat PDF Forms
Question details
The user needs a reliable way to ensure that a website URL entered into a PDF form text field can be clicked and opened in a web browser.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating an interactive PDF form where respondents need to submit a website link that the document recipient can easily open.
- Observed behavior
- Standard text fields do not reliably auto-detect URLs. A separate button or specific text field formatting is required to trigger the browser launch.
Ensure you have a PDF editor with form creation and JavaScript capabilities, such as Adobe Acrobat Pro, open and ready to edit your document.
Use a Button with JavaScript to Open the Entered URL
The most reliable method is to pair a standard text field with a clickable button that uses JavaScript to fetch the entered text and launch the URL.
This approach avoids the unreliability of automatic link detection in different PDF viewers. By explicitly linking a button to the text field's value, you guarantee the action executes when the user clicks.
Add a text field where users will type the website address. Right-click the field, open 'Properties', and name it exactly 'URLField'.
Insert a 'Button' form control next to your text field. Right-click the button and select 'Properties'.
In the Properties window, navigate to the 'Actions' tab. Set 'Select Trigger' to 'Mouse Up' and 'Select Action' to 'Run a JavaScript'. Click 'Add'.
In the JavaScript Editor, enter the following code: app.launchURL(this.getField("URLField").valueAsString); then click 'OK' and close the properties window.

Enable Rich Text Formatting for the Text Field
If you prefer not to use JavaScript buttons, you can allow form fillers to manually create hyperlinks within the text field by enabling Rich Text Formatting.
Create Interactive PDF Forms Easily with WPS Office
WPS Office offers a robust PDF editor that allows you to design, edit, and fill interactive PDF forms. It serves as a highly compatible, cost-effective alternative for handling document workflows.
- 1. Open the PDF Editor: Launch WPS Office and open your PDF document. Navigate to the 'Form' tab on the top ribbon.
- 2. Insert Form Controls: Click on 'Text Field' or 'Push Button' to add interactive elements to your document. Drag to place them perfectly.
- 3. Adjust Properties: Double-click the inserted form fields to adjust their names, appearances, and specific actions.
- 4. Save and Distribute: Once your form is set up, save the document. It is now ready to be filled out by any standard PDF reader.

Frequently Asked Questions
Why isn't the URL automatically clickable in a standard PDF text field?
Most PDF viewers treat standard text fields as plain text. They do not run the background processes required to auto-detect and hyperlink URLs in real-time, which is why a dedicated button or rich text formatting is necessary.
What happens if a user forgets to add 'http://' or 'https://' to the URL?
The JavaScript app.launchURL() method generally requires a fully qualified URL to work correctly. If the protocol is missing, the browser may fail to open the page. You can add instructions to the form asking users to include 'https://'.
Will this JavaScript button work on mobile PDF readers?
JavaScript support varies significantly among mobile PDF readers. While it works reliably on desktop versions of Adobe Acrobat and WPS Office, mobile apps might block or ignore the app.launchURL() command.




