- 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-06-2016 09:39 AM
I generally use field messages rather than tool tips - especially for checkboxes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 10:51 AM
I gave this a try, and it puts it at the bottom of the whole "Options" section it creates for my group of checkboxes. I suppose I could make that work if it didn't stick the "Options" title above each set of checkboxes. Do you have any insights into how that might be accomplished?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2016 06:25 AM
- 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.