On Tue, Apr 3, 2012 at 14:59, Wall-D <[email protected]> wrote: > Here ist the problem: > > here ist the code from edit.ctp > .................... > <?php > $counter = 0; > foreach ($this->data['Detail'] as $detail): > echo > $this->Form->hidden('Detail.'.$counter.'.id',array( 'value' => > $detail['id'])); > echo > $this->Form->input('Detail'.$counter.'DetailType'.'name', array( > 'type' => 'select', > 'label' => 'Detail Art ', > 'selected' => > $this->Form->data['Detail'][$counter].'detail_type_id', > 'div'=>'formfield', > 'error' => array( > 'wrap' => 'div', > 'class' => 'formerror' > ) > )); > echo $this->Form->input('Detail.'.$counter.'.name', > array( > 'label' => 'Detail', > 'div'=>'formfield', > 'error' => array( > 'wrap' => 'div', > 'class' => 'formerror' > ) > )); > $counter++; > endforeach; > ?> > > The selectBox(Detail Type) is empty, no option available. in the Textbox the > correct value is displayed.
You aren't passing any options to the selectBox so it has nothing to show. Do you want to pick from the entire list of DetailTypes? Try finding all DetailType as a list and using that as the options for the SelectBox. 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
