On Feb 21, 9:05 pm, "the_woodsman" <[EMAIL PROTECTED]> wrote:
> Ad7six,
>
> Thans for your input, but to be honest i'm still confused!
>
> To quote from that link you posted:
>
> "In Cake 1.2, we're transitioning to an approach to form building that
> is more directly model-oriented, and according to the API, the first
> parameter to FormHelper::create() is actually supposed to be the name
> of a model, i.e.:
> <?=$form->create('Task', array('default' => false)); ?>
> However, if you don't provide one, it is assumed to be the default
> model for the controller (in this case TasksController)."
>
> If this doesn't look at the Model in any way, why would you need the
> name of the model?!? Surely there's nothing in $data to use ot guess
> what kind of form field to use...
>
> I'm sure once i switch to 1.2 It'll all become clear!
>
> Woody
Hi Woody
Try this:
put the following in any form view file (use the blog tutorial if
nothing else):
pr ($data);
look for the name of a model and the name of a field, especially after
submitting a form with something missing (i.e. using the blog tutorial
and tryihng to create an empty post)
Note that a model INSTANCE is nowhere visible or accessible the model
NAME is but that is just data.
HTH
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---