Hi Zbouboutchi,

I used 

myform = form.Form(
... 
   form.Checkbox('Image #1', checked=True),
    form.Checkbox('Image #2', checked=True),
    form.Checkbox('Image #3', checked=True)
)

in the app.py to define several checkbox whose default status are checked. 
If I insert 

<input type="checkbox" checked>

in the templates/*.html. I just got an additional checkbox (checkbox only 
without label) which is checked in the first rendering and re-rendering but 
my own checkbox keep unchanged. Not sure if I understand you correctly. 
Thank you for your suggestion and help.

Best Regards,
-Yongzhi


On Tuesday, April 7, 2015 at 1:38:20 PM UTC-7, Zbouboutchi wrote:
>
>  (re)Hi, 
>
> I presume using bare HTML might prevent this behaviour:
>
> <input type="checkbox" checked>
>
>
> Regards,
>
> Christophe.
>
> Le 07/04/2015 19:56, [email protected] <javascript:> a écrit :
>  
> Hello all,
>
> I implement a form app by following the online instruction (
> http://webpy.org/form). In my code, I use the definition 
>
>     form.Checkbox('Image #1', checked=True),
>     
> so it is checked when user accesses this form page. I noticed that if 
> there is any validation failure and the form was re-rendered, all checkbox 
> would be in unchecked status. I just wonder if there is an easy way to keep 
> all those checkbox checked in the re-rendered form. Thanks a lot.    
>
> Best Regards,
> -Yongzhi
>
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "web.py" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>.
> Visit this group at http://groups.google.com/group/webpy.
> For more options, visit https://groups.google.com/d/optout.
>
>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to