Re: Adding hover text to a check box on FORM 2.0

Anthony_Baldman
Level 2

Re: Adding hover text to a check box on FORM 2.0

Hi see my above reply. I think possibly it doesn't work since the form is popping out of the page. We are putting it in the Instructions box.

Jay_Jiang
Level 10

Re: Adding hover text to a check box on FORM 2.0

It's definitely working, you just need to tweak the CSS a bit or use some javascript to tweak it. The visible label of the checkbox element doesn't trigger the hover text, a hidden one does however.

Jay_Jiang
Level 10

Re: Adding hover text to a check box on FORM 2.0

pastedImage_2.png

pastedImage_0.png

This seems to work:

.mktoFormRow.checklist-wrap > div > div > div > label {

position: absolute;

height: 100%;

}

Dave_Roberts
Level 10

Re: Adding hover text to a check box on FORM 2.0

It looks like only the first checkbox has the Instruction text setup on the parent div as a title attribute. The others for some reason do not have the title attribute on the ".mktoLogicalField" div. I spun up a quick test form to check this out and included a few checkbox fields with different Instruction text and was able to see those in Chrome when I hovered over each label and/or checkbox -- as far as I know this should be native functionality.

Any ideas why the other checkbox parent containers wouldn't have a title="" attribute on that div? That should be populated if the Instruction field is filled out on each of the checkbox fields.

I also tried using a checkboxes field type with multiple entries, but you only get one "Instructions" input for the entire field so it shows up the same on all of the checkboxes.

----

UPDATE:

I tinkered around in the inspector a bit with the CSS and was able to add some styles to the CSS you've already got going on your stylesheet for the form labels.

I've changed the "min-height:0" rule to "min-height:2em;" (2 elastic measure = 2x font-size tall) to get the label elements to line up a bit better and highlighted them with green and red borders so it's easier to see what's going on here.

The green stuff is the nested label that you'll need to hover over to get the Instruction text on your checkbox field. The red boxes are the "text" portion of the label (not the hover text) for reference.

To distinguish the field labels (.mktoLabel) from the "not" field labels (i.e. the hover text label) I've used the ":not" selector [label:not(.mktoLabel)]. @Jay, this might be helpful rather than targeting the nested div > div > div... in the CSS selector.

Screenshot_020519_073626_PM.jpg

Screenshot_020519_073648_PM.jpg

This does not solve the issue with the other labels not showing up, but that might be because for some reason the title attribute isn't making onto the parent div.

SanfordWhiteman
Level 10 - Community Moderator

Re: Adding hover text to a check box on FORM 2.0

It's not checkbox-related but rather the way all fields work.