Convert Text to Clickable URL in Form
Confluence User - 01 Aug, 2017
I'm attempting to add a field to a purchase requisition form that allows the user to save a link to an item they wish to purchase. As there is no field option for URL, I'm using a text field and then trying to apply custom HTML to convert the value to a link.
- I have a purchase requisition form, PR_harlingen_request.
- On this form, the items entered in the PR_items form are listed in the PR_items_grid.
- There is a sub-form, PR_items, and one can use this form to add multiple items to the request.
- The sub form has a text field, PR_item_url, where one enters the item link.
I have tried the following:
- I added a Custom HTML field to the PR_items form, PR_item_link.
- I added the HTML code, <a href="#form.PR_items.PR_item_url#" target="_blank">#form.PR_items.PR_item_url#</a>.
- The result was that the text, #form.PR_items.PR_item_url#, was simply turned into a link, and the value of PR_item_url was never populated. I can understand why this happens initially, as the value has not yet been saved to the database. However, once I submit the sub-form, then go back into it, the URL still does not reflect the value of PR_item_url.
Next, I tried:
- I used the Edit Form Grid screen to edit the PR_items_grid table.
- I added a column for PR_item_url, gave it a format type of HTML, and entered in the Format field, <a href="#form.PR_items.PR_item_url#" target="_blank">#form.PR_items.PR_item_url#</a>.
- The result was that the value of PR_item_url appeared in the form grid, but it was not a URL.
How can I convert this text into a URL?
Thank you in advance for any assistance.
forms;html;customhtml