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
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,
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
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
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
5 matches
Mail list logo