Thanks mr.freeze, works perfectly
On 2 Nov., 04:06, "mr.freeze" <[email protected]> wrote:
> I think it is just a quirk of html. Try this:
>
> if not isinstance(request.vars.mycheckbox, list):
> request.vars.mycheckbox=[request.vars.mycheckbox]
>
> On Nov 1, 8:19 pm, Sebastian Brandt <[email protected]> wrote:
>
> > Hi everyone,
> > it seems as I have found a bug (if it is not intended to be that way):
>
> > I have a form with checkboxes. All the checkboxes have the same name
> > (so that you get only 1 var carrying all selected checkboxes)
> > I a user now selects only 1 checkbox you get back a number, if the
> > user selects more then 1 you get a list.
> > Is that ment by design?
>
> > How can I force get back a list?
>
> > Thanks
> > Sebastian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---