How do I get the form to autofocus the cursor into the text box? Here's one
of the approaches I've tried.
attributes = {'_autofocus':'autofocus', '_type':'tel',
'_autocomplete':'off', '_style':'height:80px; width:80px'}
score_box = SQLFORM.factory(Field('score', 'integer'), **attributes)
Interestingly, the autocomplete attribute is definitely getting through,
I've tested that repeatedly. None of the other ones are.
I did see the post about doing this with a form.custom.widget
<https://groups.google.com/forum/#!searchin/web2py/autofocus/web2py/PC2nDnltGic/OiYEpQEORnkJ>
setting, but couldn't figure out how to make that work in my case. I've
also experimented with using keepvalues=True, from looking through the book.
Any help is much appreciated. This is the last thing on my list to have
this demo ready.
--
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.