Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Dynamic Population of Hyperlinks

Introduction

In most given scenarios, we have all known and seen that the hyperlinks in HTML are static links. The selections made by the user while filling the form have no impact on the hyperlinks that appear. However, the forms can be made smart to dynamically populate the hyperlinks based on selections made by the user in real-time. The below article describes the steps to achieve the aforementioned functionality.

For example, the requirement is to provide the assignee a specific document that is uploaded on the drive/Google docs depending on the region selected. Using Custom HTML, we can convert the Google doc link into a hyperlink so that the assignee of the next stage can access it in a click

 

Steps to be followed

1. Create a grid data source which contains the country in one column and the doc URL in the second column and upload it. Please refer to this article on how to configure grid data sources

2. In Designer, create a form with three fields. A drop-down for country selection, a text field to populate the URL, and a Custom HTML to create the hyperlink for the doc.

clipboard_ec653ee36d0d45c8b06907c106fb0a8da.png

3. Configure the Country dropdown to the grid data source created under Additional Settings> Options

clipboard_e2fd6345eeefeebc5ca087b3cde3c388d.png

4. Setup pre-population rules between country and URL text field. Based on the country selection made, the corresponding document in the grid data source will be populated in the text field. Please refer to this article on how to configure pre-population rules

 

clipboard_e19c5c6e31a8cf91aff420a9a1c265c33.png

5. Now create a hyperlink of the value that is populated in the text field. To accomplish that,

  • Click 'Edit HTML Content' in the Form Field.
  • In the Custom HTML Setup window, click Source. This Section will show the Source HTML for this Form Field
  • Below piece of code will create a hyperlink dynamically for the URL present in the text field. result::element21 is the form result value of the text field. That value is added to "a href ". target="_blank" is to open the link in new tab.

                        clipboard_e2e6fd0bb6463b0816ac7b901d7a71eb5.png

  • Was this article helpful?