On 14-12-2015 08:56, Alfonso Serra wrote:
Hi Anthony, Thanks again but it isnt working on postback.

|
chk =True
ifchk:
     _input
=INPUT(_type="checkbox",_name=field.name,_class="checkbox",_value="on",_checked="on")
else:
      _input
=INPUT(_type="checkbox",_name=field.name,_class="checkbox",_value="on",_checked="on")
|

Still results in an unchecked checkbox when the form is submitted. Ive tried
every combination, with value, without value, with checked, without it and
combinations of both.


The parameter's name should be 'value', not '_value' and '_checked' is not 
needed:

INPUT(_type="checkbox",_name=field.name,_class="checkbox",value="on")

Cheers,

Carlos Correia
=========================
MEMÓRIA PERSISTENTE
Tel.: 218 471 841 (NOVO)
GSM:  917 157 146 / 967 511 762
e-mail: ge...@memoriapersistente.pt - URL: http://www.memoriapersistente.pt
Jabber: m...@jabber.org
GnuPG: wwwkeys.eu.pgp.net
URL Suporte: https://t5.m16e.com/gps

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to