>
> I do not use SQLFORM because fixing the html it generates often takes more 
> time than to write my own html.


You can write your own completely custom HTML and still use SQLFORM on the 
server side to handle validation, database I/O, and CSRF protection. I 
would not give up SQLFORM just because you don't like the HTML. 
Furthermore, you can completely customize the HTML it generates by writing 
a custom formstyle function. You can also create custom widgets and define 
your DAL model using them.
 

> I think there are some improvements that can be done to forms anyway, 
> which can be implemented in a new standard.For example that it's a bit 
> tricky to remove colons from form labels.
>

SQLFORM(db.mytable, separator = '')
 

> Furthermore, if I want to edit the form action attribute (as I cannot just 
> do *form['_action'] = myvalue*)
>

If it is a SQLFORM, you can just do:

SQLFORM(..., _action='myaction')

If it is an automatically generated form (e.g., an Auth form), after the 
form has been created, you can indeed do:

form['_action'] = 'myaction'
 

> and a more straight forward way to deal with "remember me" (as there is no 
> *form.custom.rememberme*).
>

The label can be changed via auth.messages.remember_me_label. The widget 
can be accessed and altered/replaced via:

form.element('#auth_user_remember')

And the entire form element can be accessed via:

form.element('#auth_user_remember__row')

Also, keep in mind that even with the proposed change, there will still be 
automatically generated HTML -- it will just be handled via JS in the 
browser rather than in Python on the server. If you want to customize, 
you'll still have to do some manipulation in code (or write the HTML 
manually).
 

>
> Edit:
> And while we're at it, what are the chances that web2py could have some 
> ajax CRUD helpers?
>

Can you explain in more detail what you want? Note, one easy way to ajaxify 
anything in web2py is to put it inside an ajax component (i.e., LOAD(..., 
ajax=True)). You can put forms and grids inside ajax components and 
everything will happen via ajax.

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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to