fields = [ Field('name', 'string', default=defaults['name'], 
requires=[IS_NOT_EMPTY(error_message='Enter name')]), ]
form = SQLFORM.factory(*fields, _class="uk-form uk-form-horizontal", 
_name="edit_form")
if form.process(hideerror=True).accepted:
            print (form.vars.name, request.vars.name)

If I enter "Bob " (with trailing space in input field) I get printed:
('Bob', 'Bob ')

form.vars.name looses trailing space and I didn`t ask for this. 
request.vars.name is correct. 

I do *form.vars.name = request.vars.name* later in my code to counter this. 
I need all spaces preserved as they are entered. I didn`t find any 
explanation for this in the help/book.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to