On Friday, December 16, 2011 9:39:46 AM UTC-5, whowhywhat wrote: > > i am trying to figure out the SQLFORM.grid from the source. The create and > update forms are generated using SQLFORM and not crud.. my mistake thinking > this was done by CRUD. I guess i will need to customize the form by passing > form.create_form.append(whatever) .. is this the right way? .. i will try > to figure it out. Please pardon me, i am just a self taught novice coder
Sounds like you're on the right track. I haven't tried it, but I assume you could also use the form customization method described here: http://web2py.com/book/default/chapter/07#Custom-forms (for custom layout, not adding new fields). You would refer to form.create_form.custom.widget.yourfield, etc. Note, you would need some logic in the view to determine whether the current request is for an edit form, create form, etc. (which you can figure out from request.args). Anthony