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

Hover over Help Text for Check Boxes

ljschwaberow
Giga Expert

Has anyone been successful in getting hover over text for check boxes?

1 ACCEPTED SOLUTION

If anyone wants to know how to do this here it is:


Client Script:


function onLoad() {


    //Type appropriate comment here, and begin script below


      gel('ni.IO:SYS_ID').title="Test to show when mouse is on the variable";


}


View solution in original post

13 REPLIES 13

Hi Kevin,



To be honest I don't know what the ni is exactly referring to, so if anyone else does please chime in. I came across this syntax by inspecting the element of the check box while viewing the catalog item, this is what I saw:


find_real_file.png


After some trial and error I found that the ni.IO was the key. We are doing the same thing on another catalog item but to a label. The syntax that works for that is gel('label_IO:sys_id').title = "New title";


I greatly appreciate the quick response. I should have known to inspect the element. Thank you for the thorough details. I appreciate it.



Edit: I attempted what you suggested. However, it did not work for my check box on my Catalog Item. I think I am going to be stuck using Mark's suggestion of the label above the checkbox until the tooltip is allowed to be used on Check boxes.



Thank you again,



Kevin        


Thanks for sharing   your solution.



How would I get this to work in the portal?



Thanks,



Lucy


The 'Hint' option isn't available for any catalog variable.   You use the 'Show help', 'Help tag', and 'Help text' fields to show help for variables.   There are ways (via scripting) to add a hover tooltip, but most of those ways (especially for a checkbox variable) would be prone to break in a future upgrade.



Checkbox variables don't give you the ability to add 'Show help' options either though.   You can add a 'Label' variable and give it an order so that it shows up right before your checkbox variable.   That will override the default 'Options' container and label that wraps around checkbox variables.   Within that label you can name it whatever you want, and you can also set up 'Show help' options for the checkboxes underneath.



This SNGuru article explains further...



Multiple Checkbox Variables in Service Catalog and Surveys - ServiceNow Guru