Hi
I have used Javascript and PHP for several months now, but I have yet to use a framework. I'm still a bit unsure about which is the best method for creating my forms. I usually put form validation in both the Javascript and PHP. I'm planning to learn a new framework now, and buy one of Larrys books. Either the Javascript or the Yii book. So the answer to this question will also help guide me towards the right book.
All the PHP frameworks have some method of creating forms. There is a Yii example at http://www.yiiframework.com/doc/guide/1.1/en/form.view
A form can also be generated using Javascript, and the various Javascript frameworks also have their own ways of generating forms. There is a Knockout.js example at http://knockoutjs.com/examples/contactsEditor.html
Of course you would need to add some PHP to this to have it store the contacts in a database.
Which method is "best practice"? Javascript seems to provide more flexibility for trendy display techniques, but it would seem to me that PHP would integrate better with the back end database.
How do you decide upon the code for generating your forms?
Thanks
Diarmuid