tooltipdiv onHover showing minimal text / only field title

cubefree 09 Apr, 2013
Yo Grayhead,

Thanks for creating one of the best components to ever lay atop a CMS!

Before you pour your beer of choice, might I ask ...

How do set set the tooltipdiv text to show properly in V4?
I have set the text that should appear onHover of the "i", but alas I am getting ONLY the title of the field NOT the text I have set in the Form Wizard.

For example, I set "Do NOT use abbreviations or references to authors or institutions" as the text in the ToolTip area for the field, but what I see in the new version is not like this OLDER version sample attached.

OLD (very old version of ChronoForms / see screenshot ~ THIS IS WHAT I WANT 8) )
http://www.westernsurg.org/index.php?option=com_content&view=article&id=35&Itemid=40

NEW (when I hover over the "i" I am seeing only the field name in a yellow box, the standard onHover "a href title" display behavior of all browsers ... sorry screenshot software is not cooperating for best display)
http://www.westernsurg.org/new/index.php?option=com_chronoforms&view=form&Itemid=40
GreyHead 10 Apr, 2013
Hi cubefree,

I think it ought to work OK, the text you want is in the Form HTML. At the moment there is a bug in the script to add the * to the required input labels, it's failing on the radio button with no label. Please will you comment this out temporarily and see if the tooltips then work.

Bob
cubefree 10 Apr, 2013
Yes you're right the JS code loaded in the form for required fields is interfering. When commented out, the onHover on the "i" does work properly.



[code]
window.addEvent('domready', function() {
var required, cl, inputs, input, label, type, name, skip, marker;
marker = new Element('span', {
html: ' *',
styles: {
color: 'red',
fontWeight: 'bold'
}
});
inputs = $$('div input, div select, div textarea');
required = [];
inputs.each(function(el) {
cl = el.getProperty('class');
if(cl !== null && (cl.contains("validate['required'") || cl.contains("validate['group["))) {
required.push(el);
}
});
required.each(function(el) {
el.addClass('cf_required');
skip = false;
type = el.getProperty('type');
if(type == 'radio' || type == 'checkbox') {
if(name != el.getProperty('name')) {
label = el.getParent().getParent().getFirst('label');
name = el.getProperty('name');
} else {
skip = true;
}
} else {
label = el.getParent().getFirst('label');
}
if(!skip) {
label.grab(marker.clone(), 'bottom');
label.addClass('cf_required');
}
});
});
[/code]
GreyHead 10 Apr, 2013
Hi cubefree,

Great, thank you. I'll see if I can work out how to fix that to handle missing labels.

Bob
GreyHead 10 Apr, 2013
Hi cubefree,

Please try changing this line
    if (!skip) {
to
    if (label && !skip) {

Bob
This topic is locked and no more replies can be posted.