One question that I’ve seen come up a few times is: “How do I handle multiple checkboxes in a form?” The only trick here is
Day: May 5, 2008
I’ve completely abandoned using Prototype/Scriptaculous in favor of JQuery. I simply prefer the way JQuery does things: Simple syntax No more in-line JS Lots of
If your application requires to display a lot of data from the DB, then I suggest you take a look at this nice, little HTML
You probably know that if you have $scripts_for_layout in your site’s layout, then you can include JS files from the view. For example, if you’d like
CakePHP models, unlike super models should be fat. It’s a good practice to keep redundant code out of your controllers. Here’s a quick example on
A nice little trick to check if you have some errors in the view is to use the $session object. Try this (in the view):
Update: as of 05/18/2008 there is a new core Containable behavior, which is an evolution of a few previous behaviors, including Bindable. If you are
CakePHP 1.2 provides a very easy way to send emails using the built-in Email component. However, sending emails directly from your User’s controller add action, for
In the past I’ve often kept some data such as a list of states or countries in the DB and used that to populate my
A little trick to make your paginator links look pretty… Add a ‘class’ option to your paginator links like so: [sourcecode language=’php’]