[web2py] Re: Trouble Creating Update Form

2014-08-11 Thread Drew Howell
I seem to have a problem there. It returns None. However, I think I may have figured out a solution. I've managed to update the current day 'rating' & 'complete' fields and also the 'complete' field of the next day (making it current). Let me know if you see any problems with the way I ended u

[web2py] Re: Trouble Creating Update Form

2014-08-11 Thread Massimo Di Pierro
Try print/log the value of r in your code. Perhaps do a {{=r}} and see if there record you are trying to edit is there. On Sunday, 10 August 2014 15:57:02 UTC-5, Drew Howell wrote: > > It's still creating a new record rather than updating. So I've still got > something wrong. I need to look over

[web2py] Re: Trouble Creating Update Form

2014-08-10 Thread Drew Howell
It's still creating a new record rather than updating. So I've still got something wrong. I need to look over the code and see if I can find anything that sticks out. On Sunday, August 10, 2014 4:07:57 PM UTC-4, Massimo Di Pierro wrote: > > I agree that you only seem to need one form. If this is

[web2py] Re: Trouble Creating Update Form

2014-08-10 Thread Massimo Di Pierro
I agree that you only seem to need one form. If this is the case there should not be problems. Can you confirm? Massimo On Sunday, 10 August 2014 12:58:06 UTC-5, Drew Howell wrote: > > The purpose of the app/page is to track progress of a workout routine. It > is a 5 week / 35 day schedule. I h

[web2py] Re: Trouble Creating Update Form

2014-08-10 Thread Drew Howell
The purpose of the app/page is to track progress of a workout routine. It is a 5 week / 35 day schedule. I have all the "static" information stored in the table (Day, Week, Workout Name), but there are 2 other fields in the table that would need to be updated: "rating" which is where you rate yo

[web2py] Re: Trouble Creating Update Form

2014-08-10 Thread Massimo Di Pierro
That's it then. You cannot have multiple forms on the same type on one page unless they refer to different tables. There are other ways but it really depends on what you are trying to do. Can you explain in words what is the page supposed to do. On Sunday, 10 August 2014 11:11:05 UTC-5, Drew H

[web2py] Re: Trouble Creating Update Form

2014-08-10 Thread Drew Howell
I made the changes and switched to using {{=form}}, but It's still creating a new record. I just realized I didn't post a part of the view that might be causing the issue. I have multiple forms on a single page. ... {{=for row in rows:}} {{=form}} {{pass}} ... Could that be causing the

[web2py] Re: Trouble Creating Update Form

2014-08-09 Thread Massimo Di Pierro
One problem is that you want to select after you process the form: def workouts(): r = db.workouts(request.args(0)) form = SQLFORM(db.workouts, r).process() if form.accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' r