Still no luck but some what closer.

I simply want to be able to add a input beside every checkbox will add that
into the foreach after I get the checkboxes working first)

$skills is the list of HABTM options to select from 
view:
 
<?php foreach ($skills as $skill => $value)
   {

   
   echo $form->input('Skill'.$skill, array('type' => 'checkbox',
'label'=>$value, 'div' => false, 'value' => $skill, 'name' =>
"data[Skill][Skill][]")); 
 
   }
   ?>
 
My HTML renders:
<input id="SkillSkill11" type="checkbox" value="11"
name="data[Skill][Skill][]"/>
 
the checkbox form when using multiple as a reference to go by produces
(I have an original form with the selects on the same page so I can see the
difference between the 2) 

<input id="SkillSkill11" type="checkbox" value="11" checked="checked"
name="data[Skill][Skill][]"/> 

So I am missing the checked="checked" , tried using checkbox as the
$form->checkbox but setting checked => true or false selects them all or
none. I just cant seem to get the data to fill the selected checkboxes. What
am I missing? Anyone have any ideas? Tried $form->select, $form->checkbox,
$form->input with type => checkbox to no avail....

Any ideas?

Thanks
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to