On 06/27/2012 07:30 PM, Jonathan Lundell wrote:
On Jun 27, 2012, at 4:08 AM, Pedro Casalinho wrote:
This may be a dumb question but, should forms be created in
controllers and passed to the view or should they be created in the
view, taking into consideration the MVC model
MVC is a pretty leaky abstraction, especially in the context of
web2py, where you start creating the view in your model (with explicit
or implicit control over the representation of fields).
At any rate, create your forms in the controller, because you need to
deal with their submission there.
--
OK, hate to nag about it, but your declaring a type of field in the
model. Sometimes you have to make your own type of field. If you create
your field types correctly in the model, then web2py knows what to do
when creating the view. :) That's one thing about Web2py I go giddy over. :)
BR,
Jason
--