Hyperlinks from parameters

Hi

Is there a way to auto create hyperlinks, when a text message is passed from a Parameter into the Datamapper/Template.

In my example I place this text from a parameter into a Datamapper/template:
Text from workflow (SQL DB):
“Hvis du har spørgsmål eller brug for information om dine rettigheder kan du ringe til Region Nordjyllands Patientkontor alle hverdage mellem kl. 9-12 på tlf. 97 64 80 10.
Få vejledning hos Patientkontoret

Is there a way to recognize an https address as a hyperlink, and auto create the hyperlink - when placing text.

You would have to script that using a Regex.

Found this link that actually explain how to do what you want:

regex - Detect URLs in text with JavaScript - Stack Overflow

So by doing this in a script in a Template, you manually extract the URL part into a <a href=“[url]”>[url name]</a> and merge all this into a text on your Template.

1 Like

Super will try it - it looks simple.

Ended up with this script in the template and a small piece of css - cause I did not want to have the text blue and underlined.

Script:
image

CSS
.BlackNoUnderline {
text-decoration: none;
color: black;
}