Neither of those has anything to do with any GET vars. request.get_vars.id
represents an "id" variable passed in the query string of the URL.
On Monday, April 21, 2014 12:19:56 PM UTC-4, Sharon Correll wrote:
>
> Yes, using request.get_vars.id solved that problem. And it turns out that
> I was c
Yes, using request.get_vars.id solved that problem. And it turns out that I
was confusing it by using different form-names, so the modification is now
happening as expected! Hurray, thanks for your help.
Just to clarify, when I I look at the HTML I see:
...
The ID 12 is in there
When you say you are using request.vars.id, do you mean you have an "id"
variable in the query string, as in /myform?id=1?
If so, change the name of that variable to something else, as the edit form
will include its own hidden field with the name "id" -- so upon submission,
there will be a requ
I changed it to look very similar to this:
> def myform():
> record = db.langResource(request.args(0))
> form = SQLFORM(db.langResource, record=record).process(
> message_onsuccess='Resource modified' if record else 'New
> resource added')
> return dict(form=form)
>
>>
except
You should not call form.process twice. Does idToEdit come from a URL arg
or var? Maybe something like this:
def myform():
record = db.langResource(request.args(0))
form = SQLFORM(db.langResource, record=record).process(
message_onsuccess='Resource modified' if record else 'New re
5 matches
Mail list logo