Hello AD,
yes, that's indeed described very well in the manual (Model-section),
BUT:
what if I wanted a group checkboxes instead of the multiselect?
The resulting array should/could be something like
array(
[Movie] => array(
[Movie] => array(
[0] => 2,
[1] => 4,
[2] => 5,
)
)
)
Checkbox creation is clear: loop through the movies (values come from
generateList) and fill the options-array of the FormHelper::input
method.
But what should I pass to the $fieldName param $form->input in order
to get
... name="data[Movie][Movie][<idx_of_array>]" ...
in HTML.
... not sure, maybe I misunderstood something ...
Thanks in advance, Christoph
On 10 Jul., 11:49, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 10, 10:57 am, BoSc <[EMAIL PROTECTED]> wrote:
> <snip>
>
> > Basically, the question comes down to... how can I 'crawl' through the
> > $this->data array... and make Cake clear that this contains more than
> > 1 record.
>
> Assuming you have Movie hasAndBelongsToMany Category, if you follow
> conventions cake does it for you. you just need a multi select named
> Movie.Movie in the view for your Category assigning (or whatever) view
> and when you save, the links will get created. Try with scaffolding or
> bake or refer to the manual if this pointer isn't sufficient.
>
> 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
-~----------~----~----~----~------~----~------~--~---