[html-formfu] name and id are missing from customized Checkboxgroup elements

Carl Franks fireartist at gmail.com
Wed Dec 19 20:13:18 GMT 2007


On 19/12/2007, kewei xiao <kewei.xiao at nald.ca> wrote:
> Carl Franks wrote:
> > It's your lucky day ;)
> >
> > I've committed an update to support attributes_xml
> > You can use both attributes + attributes_xml - they'll get merged.
> >
> > I've also added the shorter versions - attrs, attrs_xml, label_attrs,
> > label_attrs_xml
> > You can NOT use both a long and short version of a single option in
> > the same list item.
> >
> > Oh, and it error checks too, so it'll die if you use an unknown key.
> >
> > Carl
> >
> > _______________________________________________
> > HTML-FormFu mailing list
> > HTML-FormFu at lists.rawmode.org
> > http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
> >
> >
> I've tried, it works perfectly, I also wonder can i include default
> inside attributes, like this:
>
>                       attributes => { id => 'keyword_' . $_->keyword_id,
>                                     default => $checked{ $_->keyword_id
> } || undef }
>
> Since default is not accepted by options.

No, that'll just add default="xxx" to the tag, which is meaningless.
Think of the entire group as a single field.
You should be passing 'default' to the element, not the items within it.

Carl



More information about the HTML-FormFu mailing list