SQLform.grid request not sending bool valuis

22 views
Skip to first unread message

Yebach

unread,
Nov 24, 2020, 7:21:41 AM11/24/20
to web2py-users
Hello

I have a SQLform.grid and when validating fields i have some issues 

so to come around i have

if request.args and request.args[0] in ['edit', 'new']:
        if form.update_form:
            if form.update_form.accepts(request.vars):
                print request.vars
                print request.args
                session.flash = T('Diagnoza postavljena')
                redirect(URL())

the problem is that reques.vars is not including fileds that are of type boolean

therefore i did a workaround and whn bool field is set as string it does but i want to change the text field to be checkbox

any suggeestion? Either on getting the bool value or changing the field to be checkbox

Thank you 

AGRogers

unread,
Nov 24, 2020, 10:31:43 PM11/24/20
to web...@googlegroups.com
Are the boolean fields writable? I think unwritable fields are excluded from request.vars.

___________________________
www.TenOutOfTen.org



--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/55aa4f8e-7da4-48c6-a526-f074f6aaa9acn%40googlegroups.com.

Vid Ogris

unread,
Nov 25, 2020, 1:22:06 AM11/25/20
to web...@googlegroups.com
Yes they are writable.

V V sre., 25. nov. 2020 ob 04:31 je oseba AGRogers <roge...@gmail.com> napisala:
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/iDcA3N_NMcY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CACWMBMPGELDe%2BKZ8nVt0dK%3DqLfCbf-mOCKQtEL9BJEU5P%3DzOCg%40mail.gmail.com.


--
Lep pozdrav 

Vid Ogris


Reply all
Reply to author
Forward
0 new messages