Re: [web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-25 Thread Johann Spies
What about using the keepvalues option: From the book: form.accepts(vars, session=None, formname='default', keepvalues=False, onvalidation=None, dbio=True, hideerror=False): Change keepvalues to True Regards Johann On 24 April 2013 18:23, Niphlod niph...@gmail.com

Re: [web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-25 Thread Teddy Nyambe
Hey cheers!!! exactly what am looking for On Thu, Apr 25, 2013 at 8:40 AM, Johann Spies johann.sp...@gmail.comwrote: What about using the keepvalues option: From the book: form.accepts(vars, session=None, formname='default', keepvalues=False, onvalidation=None,

[web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-24 Thread Niphlod
you mean an edit form ? record = db.table(1) form = SQLFORM(db.table, record) On Wednesday, April 24, 2013 5:35:18 PM UTC+2, software.ted wrote: Is there a way to make the form generated by SQLFORM return the current fields saved in the DB instead of making the fields blank? What i want is

Re: [web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-24 Thread Teddy Nyambe
yah that exactly, but when you add a new record, the saved record does not show in the form. I want the fields to remain with saved content. Even when i use the example u have givenbut when i click on a button with an id with an existing record in the db it shows without any problem...when i

Re: [web2py] Re: REF: Generated SQLFORM form behavior sought

2013-04-24 Thread Niphlod
I think you need to be more clear...either you want to: - add a new record -- if you want to preload default values you just have to set them beforehand - edit an existing record -- it's obvious that what you edit (and submit) has the same value of the next attempt to edit the same record On