CakePhp Submit extra Values
Posted on 2010-09-01
I have a form in a view and I also have some variables which I need to submit.
My view looks like this:
echo $form->create('Upload',array('type'=>'file', 'url' => 'uploads'));
echo $form->input('0.file',array('type'=>'file','label'=>'Image Upload: '));
The above works fine and submits to table but the table has other fields too so I'd like to submit them too.
For example - something like this:
echo $form->input('Upload', array('user_id' => '100'));
The table has also a field called user_id and I'd like to add this.
How can I do this please?
I know the format is not:
echo $form->input('Upload', array('user_id' => '37'));
What would it be ... if possible please?