JavaScript functions to provide richer CakePHP form views