Posted by Duncan | Posted in Yahoo! UI, cakePHP | Posted on 08-08-2010
3
When a user signs up to your website, trying to find a username that is not already in use can be a real pain and could cause them not to sign up if they are repeatedly presented with an error. To solve this you can use a simple bit of JavaScript to check if their chosen username is available before submitting their registration.
Posted by Duncan | Posted in Yahoo! UI, cakePHP | Posted on 20-05-2010
0
Recently I came across a problem, where I wanted to show a select box for zones in an address (counties or states etc.). I have a list of zones in my database and to put them all in one box would have been unusable as the list is in excess of 2000 zones. My solution to this was only show the zones related to the country selected in another select box. When the user changes the country the zones are updated. In this tutorial I will explain how I achieved this using cakePHP (1.3) and the YUI Library (3.1.1).
Posted by Duncan | Posted in cakePHP | Posted on 21-08-2009
3
I’m sure there are many ways of doing this, but recently I finally got round to figuring out how to update multiple records at a time. When I started out all I wanted was to give all the selected records the same value for one database field, so the first thing we need to know is which records need to be updated and which field. To do this all you need is a list with your records (I’m using portfolios) inside a form with some check boxes and a select box with a list of actions.
Posted by Duncan | Posted in Yahoo! UI, cakePHP | Posted on 25-10-2008
1
Ok, so we all know how useful those flash messages are that cakePHP throw at us, “you’ve done it wrong, try again”. Well as much as I like them I don’t want to be reminded of my error untill I go to a different page. The answer is to make them disapear.
Using the YUI Animation Utility, we can simply make the div containing the message close to nothing. First you need to make sure your $session->flash() is wrapped in a div if it appears.
Posted by Duncan | Posted in Yahoo! UI, cakePHP | Posted on 23-10-2008
13
The aim of this tutorial is to be able to pull data from your database and output it in a nice shiny data table. Although the cakePHP paginator does this perfectly well, I have been using YUI and I am not a fan of the prototype library.
The YUI Paginator control is able to send requests to the server with parameters for the page required, the DataTable control can then format that data into our shiny table.
For this tutorial I have used CakePHP 1.2 RC3 and YUI 2.6.0. I am using a “Products” controller, model and corresponding views.
Thanks should go to this post http://www.ntatd.org/mark/?p=32 by Mark Buckner (aka hydra12) describing how to use cakePHP with ExtJS DataGrid, for the inspiration and the some of the cakePHP code for this tutorial.