librelist archives

« back to archive

How to get request.form["param"'] as an array

How to get request.form["param"'] as an array

From:
刘亮
Date:
2010-06-21 @ 02:35
Hi,
I'm a newbie to flask :) and  i got a problem with access request.form
like bellow:
<input type='checkbox' name='ck' value='1' />
<input type='checkbox' name='ck' value='2' />
how to get the 'ck' values as array ?

thanks.

Re: [flask] How to get request.form["param"'] as an array

From:
DasIch
Date:
2010-06-21 @ 02:43
On Mon, 2010-06-21 at 10:35 +0800, 刘亮 wrote:
> how to get the 'ck' values as array ?
request.form.getlist('ck') returns a list with the values.

Re: [flask] How to get request.form["param"'] as an array

From:
刘亮
Date:
2010-06-21 @ 03:00
Daslch, thanks a lot

2010/6/21 DasIch <dasdasich@googlemail.com>:
> On Mon, 2010-06-21 at 10:35 +0800, 刘亮 wrote:
>> how to get the 'ck' values as array ?
> request.form.getlist('ck') returns a list with the values.
>
>