Thanks!! Here's the generic version
def radio_h(field,value):
nbsp=XML(' ')
items=[TAG[''](SPAN(name,INPUT(_type='radio',
_id="%s_%s" % (field._tablename, field.name),
_value=key,
_name=field.name,
You pass the validator to the field so that it passes it to the
widget. Your widget does not handle it. You can do:
def radio_h(field,value):
nbsp = XML(' ')
items=[TAG['']
(SPAN(name,INPUT(_type='radio',_value=key,_name=field.name,value=value,requires=IS_IN_DB(db,
db.gender, '%(descriptio
Sorry for being a little thick but how do I do that? There's already a
IS_IN_DB requires in the table definition.
On Apr 11, 12:51 am, DenesL wrote:
> You forgot to set the requires for t.gender
>
> On Apr 9, 6:35 pm, niknok wrote:
>
>
>
>
>
>
>
> > I got this custom widget from the list:
>
> >
Denes is right... one caveat... the requires must be passed not just
to the Field but ALSO to the INPUT inside the widget.
On Apr 10, 11:51 am, DenesL wrote:
> You forgot to set the requires for t.gender
>
> On Apr 9, 6:35 pm, niknok wrote:
>
>
>
>
>
>
>
> > I got this custom widget from the lis
You forgot to set the requires for t.gender
On Apr 9, 6:35 pm, niknok wrote:
> I got this custom widget from the list:
>
> def radio_h(field,value):
> nbsp = XML(' ')
> items=[TAG['']
> (SPAN(name,INPUT(_type='radio',_value=key,_name=field.name,value=value)),nbsp,nbsp)
> for key
5 matches
Mail list logo