[html-formfu] Attributes in Checkboxgroup

Carl Franks fireartist at gmail.com
Mon Feb 23 22:46:59 GMT 2009


2009/2/23 Ascii King <tech at swattermatter.com>:
> I have created a Checkboxgroup, but I cannot figure out how to place a class
> in the SPAN tag that surrounds each option. The tags breakdown like this:
> <div>
>   <span>
>       <span class="HowDoIGetHERE?">
>           <input>
>           <label>
>       </span>
>   </span>
> </div>

[snip]

> I know it
> can be done.

That's quite an assumption!
However, this was quite an easy one to fix, so if you update to svn r1321
you can now pass a 'container_attributes' hashref for any item.

                  options:
                    - value: 1
                      label: Breakfast
                      container_attributes:
                        class: item-wrapper-class

Cheers,
Carl



More information about the HTML-FormFu mailing list