Re: HABTM and form->input

2008-10-15 Thread Yodiaditya
Sorry, I don't understand what you mean Todd.
Are you want to editing name in multiple select form? i guess you want make
editing form

Hope this help you a little bit :

in admin edit view
echo $form->input('Division.Division');

in function admin_edit() in Manufactures_controller

$this->set('divisions', $this->Manufacture->Division->find('list'));

Regards,

Yodiaditya
http://re.web.id

On 10/15/08, Todd McGrath <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
> I've been reading docs and searching list, but can't find an answer...
>
> I have a multiple select form input where I want to change the option
> name.
>
> Model info:
> Manufacturers HABTM Divisions
>
> admin_edit view for Manufacturers:
> echo $form->input('Division');
>
> Produces:
>  id="DivisionDivision">
> 6
> 7
> 46
> 47
> 110
> 
>
> So, I'd like to it to be:
>
>  id="DivisionDivision">
> Division.Name
> ...
> 
>
> See what I mean?
>
>
> Todd
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~--~~~~--~~--~--~---



Re: HABTM and form->input

2008-10-15 Thread ORCC

Load the values in the controller by using find with 'list' parameter

In the controller:

$division = $this->Division->find('list', Array('fields' =>
Array('id', 'name')));
$this->set('division_list',$division);

In the view
//the 'options' parameters set the list options for the select control
echo $form->input('Division', Array('options' => $division_list));

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~--~~~~--~~--~--~---