hmm,
seems a bit odd to me, because when you use Scaffolding, Cake
automatically generates a select from ENUM columns, so work arounds
shouldn't be required.
in /cake/libs/controller/controller.php
function generateFieldNames( $data = null, $doCreateOptions = true )
{
// major truncation of code!
case "enum":
$fieldNames[ $tabl['name']]['type'] = 'select';
$fieldNames[ $tabl['name']]['options'] = array();
$enumValues = split(',', $fieldLength );
foreach ($enumValues as $enum )
{
$enum = trim( $enum, "'" );
$fieldNames[$tabl['name']]['options'][$enum] = $enum;
}
$fieldNames[ $tabl['name']]['selected'] =
$data[$model][$tabl['name']];
break;
duno if that helps at all!
doh
jb
--
jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---