Re: RadioWidget patch (render items using the LABEL tag)

Clemens Klein-Robbenhaar <crobbenhaar-S0/[email protected]> Sat, 05 Nov 2005 16:57:11 +0100
Newsgroups gmane.comp.web.zope.formulator.devel
Message-ID <[email protected]>
Hi,

>>Here is a patch that let the RadioWidget items render as follow:
>>
>><label for="key_value1"><input type="radio"...>text</label>
> 
> 
> +1
> This would be a welcome feature.

Whoops, sounds like a wakeup call for the patch manager ... yawn;

The patch seems not to work for me, unless I replace the

    render_element('label', contents=input, **{'for': id})

with

   render_element('label', contents=contents, **{'for': id})

I guess its a simple oversight, and the patch works after the change.

In theory there could be a conflict with the id if two forms
having radio buttons with the same id are displayed on the same page;
In that case the label of one form might apply to the radio button
of the other form.
  However I will stay away from making things bulletproof and overly
complicated unless someone complains.


  I am going to look why the test don't fail after applying the patch,
and then check it is, modulo complaints.

Cheers,
Clemens