I am using the Tree behavior successfully but need to output to
checkboxes. When I set the 'div' to false, there are still divs
wrapped around each item. I've even set a form default to have the
div's as false. That works for other fields in my form but not the
checkboxes! Not sure why?

Goal: Checkboxes to appear like this (id an example, the default
cakephp id it gives is ok)

<p>
   <input type="checkbox" name="" value="" id="inp-08" /
>&nbsp;&nbsp;<label for="inp-08">Lorem ipsum dolor sit amet</label>
</p>

What Cake is outputting:

<div class="checkbox"><input type="checkbox" name="data[Model]
[fieldname_id][]" value="344" id="ModelFieldnameId344" /><label
for="ModelFieldnameId344">Books</label></div>
<div class="checkbox"><input type="checkbox" name="data[Model]
[fieldname_id][]" value="553" id="ModelFieldnameId553" /><label
for="ModelFieldnameId553">Computers</label></div>

Form:

echo $this->Form->inputs(array(
'Model.fieldname' => array(
                        'label' => array('text' => 'Some Options', 'class' => 
'req'),
                        'div' => array('class' => false),
                        'before' => '<p>',
                        'between' => ':<br />',
                        'after' => '</p>',
                        'type' => 'select',
                        'multiple' => 'checkbox',
                        'options' => $options_list,
                        'escape' => false
                )
));

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 [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

Reply via email to