1.  Cake does not officially support the ENUM or SET field type -
apparently implementation is too different between database systems.

2.  If they display as "normal input fields" then you would be able to
edit them.  Are you sure it isn't displaying as a multi-select list
(which can look very similar to a textarea).  For some reason I found
scaffolding did that for me last week when I had a field called
"text" (type TEXT).  Renaming the field to "contents" and it displayed
correctly as a textarea. (Strange error, as on another model the
"text" field was fine).  Just view the source to double check what you
are getting.

3.  To use your ENUM values as options in a select list, follow
something like
http://bakery.cakephp.org/articles/view/baked-enums
This will easily generate an associative array suitable for passing to
the form/html helper select function.  It will mean those actions
cannot be scaffolded, though.


On Oct 23, 6:09 pm, Olaf Greve <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Last week I gave CakePHP a first try, and then went for the stable
> 1.17 release. I created some tables, some scaffolded views, and as
> far as I remember, the enumerated DB fields all showed proper select
> fields in the edit screens.
>
> Now, I've upgraded to the yesterday's 1.2 alpha (marked as pre-beta)
> release, in order to be able to easily enable the $scaffold =
> 'admin'; trick, as I have only today left to come up with a
> (scaffolded) back-office for a prototype application. However... I
> now run into a very weird situation, in the respect that the
> scaffolding doesn't pick up my enumerated fields anymore in the edit
> view. For some reason, these fields display as normal input fields,
> but nothing can be selected/entered in them.
>
> Googling on this issue has not yet lead me to an answer. Does anyone
> know how I can enable such scaffolded select fields with the
> enumerated values in the edit view?
>  From a code point of view converting enum DB fields to HTML select
> fields is not so difficult to achieve, and I have done so previously
> too. If for some reason it is absolutely impossible to enable
> properly scaffolded enum select fields in CakePHP 1.2, can anyone
> tell me how I could best go about sticking in my own code in the
> scaffold controller?
>
> I really hope someone has a (quick and easy) solution for this, as
> time is running out fast, and I'd lke to get the entire back-office
> up and running today still...:P
>
> Tnx in advance, and cheers,
> Olafo


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to