[Html-widget] Creating separate fieldsets in a form

Carl Franks fireartist at gmail.com
Wed Sep 20 15:52:07 CEST 2006


On 29/08/06, Bogdan Lucaciu <bogdan at wiz.ro> wrote:

> 1.
> the fact that an id is always generated, although I rarely need an id,
> so the DOM namespace gets severly poluted with useless ids:
>
> (real life example)
> <label for="add_category_main_fieldset_attributes_fieldset_1_freeform_1"
> id="add_category_main_fieldset_attributes_fieldset_1_freeform_1_label">
>
> I know this is mostly a container problem, but now with the nested
> fieldsets the ids can get quite long and redundant.

I've updated svn with a new method - $w->explicit_ids( 1 )

This is an all-or-nothing fix: any element/fieldset/block which
doesn't have an id set using
    $element->attributes->{id} = 'my_id';
will not be given an id in the xml.

A thought - I've not tested this yet when errors are generated - I'll
have to check and see what happens.

The form itself will always be given an id, which is "widget" by default.

Any suggestions for an improved method name need to arrive before the
next release :)

Carl



More information about the Html-widget mailing list