Is it possible to pass the id to my action like this?

<?php echo $this->UiForm->input('id', array('type' => 'hidden')); ?>




On Thu, Jan 17, 2013 at 5:56 PM, lowpass <[email protected]> wrote:

> On Wed, Jan 16, 2013 at 5:37 PM, Karl Smith <[email protected]> wrote:
> >
> >
> >>
> >> > Now as far as my view goes..do I need to add an input for user_id and
> >> > coverage_id as hidden fields?
> >>
> >> The user_id you can add manually after the upload with
> >> $this->Auth->user('id') but for coverage_id you can either use a
> >> hidden form field or add that data to the array before saving as well.
> >> Either way, you'll need to know what the coverage_id is so you should
> >> pass it to the action in the first place:
> >>
> >> echo $this->Html->link(
> >>         'upload spreadsheet',
> >>         array(
> >>                 'controller' => 'Coverages',
> >>                 'action' => 'processSpreadsheet',
> >>                 'coverage_id' => $xxx
> >>         )
> >> );
> >>
> > Ok...I have a quick question....is there another way to pass the
> coverage_id
> > beside the code listed above. I need to pass the coverage_id  but I don't
> > need a hyperlink.
>
> Well, the link is just an example. How does the user arrive at the
> upload form? Whichever way you choose, you're going to have to pass
> $coverage_id to your action somehow.
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> 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].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to