Thanks DenesL,

It was probably the wrong example. I simplified my case but in my case
I do expect errors to be reported so I was wanting to group the error
messages for the radio buttons into one message.

Cheers, Duane.

On Apr 6, 10:56 am, DenesL <[email protected]> wrote:
> Hello,
>
> to eliminate the possibility of an error message, I would rewrite as:
>
> db.languages.language.default = 'english' # or any other in the list
> db.languages.language.requires = IS_IN_SET(['english', 'french',
> 'german'])
> db.languages.language.widget = SQLFORM.widgets.radio.widget
>
> On Apr 5, 6:32 pm, bluemoth <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hello all,
>
> > If I have the following:
> > db.define_table('languages', Field('language', 'string'))
>
> > db.languages.language.requires = \
> >                 [IS_IN_SET(['english', 'french', 'german']), \
> >                  IS_NOT_EMPTY(error_message='Value required')]
> > db.languages.language.widget = SQLFORM.widgets.radio.widget
>
> > and I render a form that when submitted has no entry, it places an
> > error message under each radio button.
>
> > Is there a way to present the one error message for the entire group
> > of radio buttons?
>
> > Thanks for you help.
>
> > Cheers, Duane.

Reply via email to