pass field containing url to html

Confluence User - 21 Jun, 2019

Greetings - I saw a few people asked this previously:

I have a field (urlstring) that stores a web url (www.google.com) . table name is mylinks and the form name is Links for example...

I tried to setup a custom HTML to allow a clickable experience but its now working ...

 

<a href="#form.mylinks.urlstring#" target=_blank>test2</a>

 

is this the right approach to creating a link that a user can click to get to www.google.com?

 

thanks

 

tony 

forms;customhtml

5


21 Jun, 2019
confluenceUser
confluenceUser

It has to be an absolute URL.

from your example, you can either :

 <a href="http://#form.mylinks.urlstring#" target=_blank>test2</a>

or ensuring when u store a web url, you store it as an absolute URL.

urlstring = http://www.google.com

hope this helps

22 Jun, 2019
confluenceUser
confluenceUser

Thanks Ian - I am getting the following: 

http://#form.mylinks.urlstringl# for some reason it is not passing the value of the hash variable...

23 Jun, 2019
confluenceUser
confluenceUser

Hi, if your form does not have a implicit record ID to be able to retrieve the appropriate row, you could try providing the correct record ID e.g. #form.tableName.fieldId[recordId]# as mentioned in Hash Variable#FormDataHashVariable.

24 Jun, 2019
confluenceUser
confluenceUser

I think the issues is that I am passing the values from a JDBC list, so there wouldn't be any record in the table unit I save/ trigger process... might have to find another way to populate the HTML from the list....

24 Jun, 2019
confluenceUser
confluenceUser

So it works if I save the record and I go back since it can read the table ( since it's stored). Is there a way to read the value in the URL text field and pass it to a variable in the custom html?

This value is also passed as a parameter... Is there a way to read this parameter and store it as a variable with a script?

 

Cheers - Tony

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print