'checked'=>true
On Oct 23, 7:19 pm, RyOnLife <[EMAIL PROTECTED]> wrote:
> Setting 'value' to '1' sets the value of the checkbox that will be returned
> if checked. It does nothing to influence if the checkbox is checked or not.
>
> Also, the checkbox I am dealing with is not tied to a model. I am just using
> the value in a controller.
>
> In html, you just add or omit 'checked' from the input tag. I can't figure
> out how to do the same in Cake.
>
>
>
> Bernardo Vieira-2 wrote:
>
> > echo $form->input('MyModel.my_tinyint_field',array('value' => 1);
>
> > That should do the trick.
>
> > RyOnLife wrote:
> >> Pardon me for asking I simple question, that I really feel I should have
> >> been
> >> able to find an answer to, but...
>
> >> Using the form helper, how can I create a checkbox which always defaults
> >> to
> >> a checked state?
>
> --
> View this message in
> context:http://www.nabble.com/checkbox-state-tp20137221p20141440.html
> Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---