Monday, March 30, 2009

Re: $form->value | How does it work?

On Mar 30, 12:28 pm, brotherkeen <sendtok...@gmail.com> wrote:
> Where does $form->value come from?  There doesn't seem to be anything
> about it in Cake documentation.
>
> All I know is that this works for selected checkboxes...
>
> echo $form->input('Tag',array(
>                 'label' => 'Tags',
>                 'type' => 'select',
>                 'multiple' => 'checkbox',
>                 'options' => $tags,
>                 'value' => $form->value('Tags.Tags')
>                 )
>             );

It appears to just read the value(s) for the specified field from
$this->data and return them. Here's the (fairly short) function from
the API: http://api.cakephp.org/view_source/helper/#line-552
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: