How to link in label of checkbox type catalog variable to be shown on Service Portal too?

Community Alums
Not applicable

I want to add a custom link in the label of a checkbox type catalog variable and I want the link to be shown on the portal too. On the catalog form, I'm able to get the link through on-load client script, but the link is not showing on the portal. 

Client Script

function onLoad() {
//Type appropriate comment here, and begin script below
$$('label').each(function(i){
if (i.innerHTML.indexOf('I have read') >-1) {
var text = "<a href='http://www.google.com' target='_blank'>"+"Use and Rental Policy"+"</a>";
i.innerHTML = "I have read and accept the " + text; }
});
}

I'm able to get the link through this client script:-

find_real_file.png

But on the portal it is not visible, I'm getting this on portal:-

find_real_file.png

I want the link on on the portal too.

Any help would be appreciated.

5 REPLIES 5

Harshad Wagh
Tera Guru

Hello,

Please check if the UI Type of client script is set to "ALL"

 

Thanks

Harshad

Developer3
Tera Expert

Hi,

I am also facing the same issue. I have unchecked "Isolate script" as well, still not working. Please let me know if this is working for you.

Alp Utku
Mega Sage

You could create label type of variable just after checkbox. 

 

On the label, you could define Help Text including hyperlink you would like to show.

 

It will be working on Portal properly. 

RaghavSh
Kilo Patron

$ is not supported on portal.

This same functionality can be achieved by creating a checkbox through macro (for ITIL view) and widget for service portal.

 


Raghav
MVP 2023