Wednesday, January 16, 2013

Re: Save Uploaded/Parsed File to Database Table




> 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. 

--
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 cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate