Im having trouble scaffolding a dropdown, it shows a normal text box
not the dropdown/select box.

Table creation....
CREATE TABLE `branches` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(50) collate latin1_general_ci NOT NULL,
  `regiontype_id` smallint unsigned NOT NULL,
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
AUTO_INCREMENT=1 ;

CREATE TABLE `branchtypes` (
  `id` smallint unsigned NOT NULL auto_increment,
  `name` varchar(50) collate latin1_general_ci NOT NULL,
  `fullstatus` tinyint(1) NOT NULL,
  `hasawards` tinyint(1) NOT NULL,
  `created` datetime default NULL,
  `modified` datetime default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
AUTO_INCREMENT=1 ;

models/branch.php
<?php
class Branch extends AppModel
{
        var $name = 'Branch';
        var $belongsTo = 'branchtype';
        var $displayField = 'name';
}
?>

models/branchtype.php
<?php
class Branchtype extends AppModel
{
        var $name = 'Branchtype';
        var $hasMany = 'post';
        var $displayField = 'name';
}
?>

controllers/branches_controller.php
<?php
class BranchesController extends AppController
{
        var $name = 'Branches';
        var $scaffold;
}
?>

controllers/branchtypes_controller.php
<?php
class BranchtypesController extends AppController
{
        var $name = 'Branchtypes';
        var $scaffold;
}
?>

Do I have something extra that shouldnt be in there? Did I set the keys
right in the db as smallint? Im sure this is something very simple that
I have missed, but I cant figure out what it is.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to