On Wed, Apr 4, 2012 at 13:50, Wall-D <[email protected]> wrote:
> Yes, it should be the list of all detail-types with the correct one
> selected.
>
> in the controller I'm passing them to the view:
> '        $detail_types = $this->Device->Detail->DetailType->find('list',
> array('order' => 'DetailType.name ASC'));
>  and the label shows up the correct DetailType
>
> I tried many combinations, but nothing worked for me ...

echo $this->Form->input('Detail'.$counter.'DetailType'.'name', array(
                        'options' => $detail_types,
                        'label' => 'Detail Art ',
                        'selected' =>
$this->Form->data['Detail'][$counter].'detail_type_id',
                        'div'=>'formfield',
                        'error' => array(
                            'wrap' => 'div',
                            'class' => 'formerror'
                            )
                        ));

Note the options part of the array. Does that change anything?

Mike.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to