The CreatorCon Call for Content is officially open! Get started here.

Reference Image Link

Ken83
Mega Guru

Hello Community,

        I created an image using this method → http://www.servicenowguru.com/scripting/client-scripts-scripting/gform-getreference-callback/

        Similar to how you would have the VIP image show up for the caller on an Incident record. I have a choice field on a form. When I set this field to 'Yes' and save the record, my image shows up. I want to add an href link to the image.The link will take the user to complete a Service Catalog form. What form it will be is based on a reference field on the form. Any ideas on how I could accomplish this?

3 REPLIES 3

Ken83
Mega Guru

I tried using the jQuery addClass method but that came up empty.


check if this helps (Picked it up from a site)



var html = $('label[for="id_group"]').html(); $('label[for="id_group"]').html('<a href="my_link.html">'+html+'</a>');

NOTE: This will not replace the label with a a, but it'll insert the link inside the label element (so you can still keep your form's label-input relations).


Tried that but it didn't do anything. Here's what I have...



var target = $('label[for="sys_display.new_call.request_item"]').html();


$('label[for="sys_display.new_call.request_item"]').html('<a href="my_link.html">'+ target +'</a>');