Update (08/03/2012): Dorin M. has refactored this solution for 2.x series, look for the code here. For details of what’s going on, read on below.
Just a quick pointer about the form helper usage…
If you don’t like the default output of $form->input();
[cc lang=”html”]echo $form->input(‘SomeModel.some_field’);
For one reason, or another you might wish to change your Model’s table on the fly…
It would seem that it should be quite easy to do with:
In all the time I’ve been following cake on IRC (almost daily), it has become very clear that other than ACL and maybe Auth, ‘required’=>true in the model validation is the most confusing part of CakePHP for many people.
Update: 11/06/2008Tarique Sani pointed out that I had an extra line of code, which wasn’t necessary to make all this work (perhaps an old habit, but the post has been modified to reflect the change). — — — — — — — — — — -
I’m sure you know that to modify your application’s homepage, one needs to edit/create the home.ctp file in app/views/pages/home.ctp.That, however, leaves you dealing with a more or less static page…
In the previous post, I’ve made a little “mistake” (if you wish to call it that) in the way I’ve setup the Security component…