On Mar 10, 9:14 am, Eduardo <meketr...@gmail.com> wrote: > Thank you, DenesL; I know that. I don't see how that would help me. I > do need to insert the data on the DB. > > Eduardo > > On 10 mar, 11:11, DenesL <denes1...@yahoo.ca> wrote: > > > FYI you can turn off the automatic DB functions when using SQLFORM > > specifying dbio=False as a parameter in the form.accepts(...), see: > > >http://web2py.com/book/default/chapter/07#SQLFORM-without-database-IO > > > On Mar 10, 9:03 am, Eduardo <meketr...@gmail.com> wrote: > > > > I need to reorder fields and group then into <fieldset> tags. Also, > > > because I'm dealing with a legacy database, I have to implement > > > validation on new entries only, not on db.py. > > > > Please note I am just guessing FORM() and accepts() would be the best > > > alternative. Feel free to suggest alternatives. > > > > Thanks, > > > > Eduardo > > > > On 10 mar, 10:51, Kenneth Lundström <kenneth.t.lundst...@gmail.com> > > > wrote: > > > > > Please explain what kind of control you need. It's much easier to help. > > > > > Kenneth > > > > > > Hello, > > > > > > I understand database inserts with SQLFORM( ) and accepts( ) are > > > > > automatic when input is valid.
Just pointing out that you can turn the auto part off. > > > > > However, I need more control over the > > > > > form fields and validation upon data entry, not on the model level. > > > > > Those are limited when using SQLFORM. You can still use SQLFORM if you want, and do any validation you might need after form.accepts with dbio=False; alternatively you could use the onvalidation parameter. SQLFORM and FORM are not fieldset friendly, but you can use them as a base in your own custom forms. > > > > > Can anyone point out a simple example of using FORM( ) and accepts( ) > > > > > to then insert the values on a database? After all the custom validation you have control over when to insert if you have dbio=False. Hope it helps. > > > > > Thanks, > > > > > > Eduardo > >