The ellipses in my example were just where I left out implementation
details. You need to replace that with the variable holding your list.

form->select('Artists', $your_list, null, array('multiple' => 'checkbox'))

Also, I just noticed that your controller has:

$programs = $this->Software->Program->find(//etc.)

Make sure you set that var before rendering the view:

$this->set('programs', $programs);

You can substitute $programs for the find() call if you don't need to
do anything with the list after finding it:

$this->set('programs', $this->Software->Program->find(//etc.));

On Mon, Jan 19, 2009 at 11:22 PM, WidePixels <d...@widepixels.com> wrote:
>
> Still no go. I used
> echo $form->select('Artists', ..., null, array('multiple' =>
> 'checkbox'));
>
> New to this. I am using 1.2 stable.
> Thanks for your help
>
> Dave
>
> On Jan 20, 12:56 am, brian <bally.z...@gmail.com> wrote:
>> Well, that all depends on your CSS. The first thing you need to do is
>> check the HTML Cake is creating. In my case, where my form has
>>
>> <div class="CheckboxGroup">
>> $form->select('...', ..., null, array('multiple' => 'checkbox'))
>> </div>
>>
>> the result is:
>>
>> <div class="CheckboxGroup">
>> <div class="checkbox">
>>         <input ... type="checkbox">
>>         <label for="...">...</label>
>> </div>
>> // etc.
>> </div>
>>
>> You can set a width on .checkbox and float it to get the result I
>> think you want.
>>
>> On Mon, Jan 19, 2009 at 1:47 PM, WidePixels <d...@widepixels.com> wrote:
>>
>> > Does anyone know how to add a CSS style to the Checkbox?
>> > My controller code:
>> > $programs = $this->Software->Program->find('list', array('fields' =>
>> > 'program', 'order' => 'program ASC'));
>>
>> > which works as I want.
>>
>> > But in the view:
>> > echo $form->input('Program',array('multiple'=>'checkbox'));
>>
>> > it just outputs:
>> > checkbox {name of program}
>> > checkbox {name of program}
>> > checkbox {name of program}.... so on
>>
>> > i would like to organize it so it looks more like a table using CSS
>> > checkbox {name of program}  checkbox {name of program} checkbox {name
>> > of program}
> >
>

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