> Just to keep things interesting, I tried this with a form from 
> SQLFORM.factory() (used as a LOAD item).  It keeps ending up in a ticket,
>
>
>   File "C:/Users/Dave/web2py_win/web2py_win 
> 2.14.6/web2py/applications/badlist/controllers/default.py" 
> <http://127.0.0.1:8000/admin/default/edit/badlist/controllers/default.py>, 
> line 46, in getpic
>     form.element(input, _id="no_table_image_url")['_autofocus'] = True
>   File "C:\Users\Dave\web2py_win\web2py_win 2.14.6\web2py\gluon\html.py", 
> line 1200, in element
>     elements = self.elements(*args, **kargs)
>   File "C:\Users\Dave\web2py_win\web2py_win 2.14.6\web2py\gluon\html.py", 
> line 1104, in elements
>     args = [a.strip() for a in args[0].split(',')]
> AttributeError: 'builtin_function_or_method' object has no attribute 'split'
>
>
Should be form.element('input', ...), not form.element(input, ...).
 

>
>
> I tried setting the widget in the factoryfield def, and that doesn't seem 
> to have an error, but doesn't autofocus.  When the LOAD'ed form is 
> submitted, I'm hoping to have the focus be on the factoryfield; when 
> loading the page, the focus should be on the starting field of the main 
> form (which is just SQLFORM()'d). [Edit:] Normal loading, and submitting of 
> the main form, does indeed put focus on that starting field of the main 
> form.
>

Need to see some code.

Anthony

-- 
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