Not really, cake knows your database strcture, so even if the data
array contains other fields it doesn't really matter.
On Feb 20, 8:48 am, "the_woodsman" <[EMAIL PROTECTED]> wrote:
> You might want to store it somewhere else, i.e $html-
>
> >checkbox('OtherData/fakeField');
>
> otherwise you may have have to modify the data array before passing it
> into model->save(), etc.
>
> On Feb 20, 7:34 am, apacheuk <[EMAIL PROTECTED]> wrote:
>
> > Obvious really.... will give it a try later.
>
> > Still getting to grips with cake at the moment, thanks for your help
>
> > John David Anderson (_psychic_) wrote:
>
> > > On Feb 19, 2007, at 3:54 PM, apacheuk wrote:
>
> > >> OK, I might be missing something here....
>
> > >> I have a form based on my model and this is working wonderfully I
> > >> can save
> > >> records and edit them.
>
> > >> I'm having trouble in that I want to include a checkbox on the form
> > >> that has
> > >> no DB field or model, but I want to use the value of that checkbox
> > >> to do
> > >> some additional stuff in the controller when I submit the form.
>
> > >> How do I include this checkbox if it doesn't have a an assciated
> > >> field in
> > >> the model and access from the controller?
>
> > > Just use the HtmlHelper methods as normal:
>
> > > <?php echo $html->checkbox('Model/fakeField'); ?>
>
> > > And use it in the controller at:
>
> > > $this->data['Model']['fakeField'];
>
> > > Is that what you're after?
>
> > > -- John
>
> > --
> > View this message in
> > context:http://www.nabble.com/Passing-a-value-from-view-to-controller-tf32557...
> > Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---