[html-formfu] Adding balloon hints to fields

Mario Minati mario.minati at googlemail.com
Sat Sep 22 17:08:44 GMT 2007


On Saturday 22 September 2007 07:22:38 Thomas L. Shinnick wrote:
> Is this the best way to add a balloon hint popup to both field and
> label?  I'm using the examples/vertically-aligned.css for testing,
> and so the 'container' is a <span>.
>
>      elements:
>        - type: Text
>          name: country_name
>          label: Country Name
>          size: 32
>          container_attributes:
>            title: Name of country (when not USA domestic)
>
> I also tried
>      elements:
>        - type: Text
>          name: country_name
>          label: Country Name
>          label_attributes:
>            title: Name of country (when not USA domestic)
>          size: 32
>          attributes:
>            title: Name of country (when not USA domestic)
> which worked, but I kinda wanted the popup anywhere on the field
> line, and this only did the actual label text and the field input box.
>
> I have only Firefox and IE7 at hand to test with.  Will adding a
> title="" to a <span> also work in other browsers?  Ah, works in Opera
> 9.23.   And IE6!

The best way depends on the browser as you stated allready.
I'm not firm with what the w3c says about the title tag, but if it works with 
the container_attributes I would go for that as it avoids flicker.

> BTW: Is there anyplace that specifically points out magic like
> 'container_attributes:' ?

What do you mean? There is some basic information on that in the cookbook.

Greets,
Mario



More information about the HTML-FormFu mailing list