[eluser]umefarooq[/eluser]
this line of code i put for example, we have to follow MVC pattern, it will keep you code clean, this what beauty of MVC pattern, if have seen people using model with to format their post data, it better to format your data in controller what ever you getting give it to model deal with database, you logic should be in controller and also same thing with view, use conditions in views and models when it requires
another thing i just have look on form generation library that can be also good for generating forms but thing is if you want out put of form according to your layout, if you play with it that's really great thing