[web2py] Re: Validation on all fields when updating only certain specific fields?

2012-06-21 Thread villas
If I don't want to see certain fields I suggest something like this: rec = db.thing(request.args(0)) db.thing.firstUserId.readable = db.thing.firstUserId.writable= False form = SQLFORM(db.thing, rec) But if that's not what you mean, take a look at the hidden parameter for SQLFORM too.

[web2py] Re: Validation on all fields when updating only certain specific fields?

2012-06-21 Thread Anthony
Are you saying you want to create a single form object on the server side that includes all the fields, but on the client side you want to break that up into several distinct forms, each of which would only submit one of the fields? If so, I'm not sure that's a common enough use case to warrant

[web2py] Re: Validation on all fields when updating only certain specific fields?

2012-06-21 Thread Osman Masood
Thanks for all the help. I tried using a 'hidden' field but it still gives me the same error. This is my SQLFORM: candidate_form = SQLFORM(db.candidate, candidate_record, hidden={'ownerUserId': candidate_record.ownerUserId}) If I print candidate_record.ownerUserId, it returns 1

[web2py] Re: Validation on all fields when updating only certain specific fields?

2012-06-21 Thread Anthony
candidate_form = SQLFORM(db.candidate, candidate_record, hidden={'ownerUserId': candidate_record.ownerUserId}) input type=hidden name=id value={{= candidate.id }} / First, shouldn't that be name=ownerUserId and candidate.ownerUserId? Note, hidden fields are not really part of

[web2py] Re: Validation on all fields when updating only certain specific fields?

2012-06-21 Thread Osman Masood
Awesome, thanks for the clarification, Anthony. I thought hidden fields were normal fields processed by SQLFORM. I used the code you gave me and it works great...hope others can benefit from it too. Thanks On Thursday, June 21, 2012 6:33:29 PM UTC-7, Anthony wrote: candidate_form =