This has nothing to do with web2py. This is how HTML was designed and
one of the reasons it sucks.

web2py FORM.accepts and validators have to just hoops to deal with
things like this.

Massimo

On Jul 7, 11:43 pm, "mr.freeze" <nat...@freezable.com> wrote:
> <input type="checkbox" name="color" value="red">Red<br>
> <input type="checkbox" name="color" value="yellow">Yellow<br>
> <input type="checkbox" name="color" value="blue">Blue<br>
> <input type="checkbox" name="color" value="orange">Orange<br>
> <input type="checkbox" name="color" value="green">Green<br>
> <input type="checkbox" name="color" value="purple">Purple<br>
>
> If I check more than one item request.vars.color is a list
> If I check only one item request.vars.color is a string
>
> It's easy enough to type check it but was just curious if it is by
> design. It threw me off because my loop that was returning single
> letters when I selected only a single item :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to