- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 08:46 AM
I have several checkboxes in one of my catalog items and I'm trying to add tooltips to them. This is on Geneva, by the way. From what I've been able to find in the community, checkboxes don't normally support tooltips, even if you make sure it's available on the sc_req_item form. I read some posts that talked about altering the title field of the element in an onLoad client script. I tried it and got a very interesting result. I added this:
gel('ni.IO:<checkbox-sysid>').title = 'My tooltip value';
When I bring up the form, I still have no tooltip value. The interesting part is, if I inspect the element in the browser, it shows a blank title, but it has moved my tooltip value into an attribute called "data-original-title". Does anyone have any idea how to prevent it from moving the "title" value to "data-original-title"?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 07:46 AM
Hi Cindy. Thanks for the input. I'm on Geneva as well. Here is what it looked like when I first added the field messages:
The messages for "Long-Lived Session" and "Original (Client) IP Required" are not directly under their checkboxes. Then I added the labels as you recommended, and it looked like this:
This is much better, but for it to work I had to put a label before each one, and that seemed a bit redundant. I decided to dive back into the rendered HTML, and I finally figured out that I was specifying the wrong element name when manually adding the title. The following does work for checkboxes in an onLoad client script:
gel('ni.IO:<sysid>_label').title = 'some value';
Originally I was leaving off the "_label" portion of the element name, but when I added that it works perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 07:54 AM
wow - good job!
Yeah for mine I just have the one label, followed by all the necessary checkboxes. And you are right that the messages always appear at the bottom of the list. For our purposes that is ok (unless of course it is a very long list and the message may as such be missed).