the array('multiple'=>'checkbox') is a nice feature, but I think your
outside its intended use.
I ran into a simular situation.
I built a foreach loop that creates each checkbox individually.
In your case if your going to set the checked value you would also add
a disabled attribute.


On Mar 3, 12:58 am, TimG <t...@gurske.com> wrote:
> Hey,
> I have a multiple select that is being displayed as checkboxes thanks
> to the "array('multiple'=>'checkbox')" code. I need to set it somehow
> so that users can only select new items. So they can check new
> checkboxes but not uncheck boxes that are already checked when the
> page loads.
>
> I figured out that my best bet is to disable the already selected
> boxes and then add a hidden field selecting them. What I don't know
> how to do is how to add the if statements so that when the form helper
> does its magic it'll render it like that.
>
> I can scrap the checkboxes if need be and just use a multiple select
> box... I just need to make it so the user can select items but not
> unselect the ones that are already selected. And I would prefer not to
> use JS. Better to do things server side.
>
> Any thoughts?

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