hi girls, guys...

i would like to implement a multiple file upload function on my page.
a lot of modules will use it, so i would like to store all the files
in a folder and in one table! i created an upload module and a table
for it...

id - automatic
filename - original filename
module - which module uploaded it
entityid - who owns the file (for example: module: user, entityid: 6
means this file is related to the #6 user.)
created_at
updated_at

However in the UploadForm.class I did not deal with these attributes,
because they will come from the uploaded file (filename) and from url
(module name, entityid). In the UploadForm.class I only created 10
file input fields:

for($i=1; $i<=10; $i++) {
   $this->widgetSchema['upload'.$i] = new
sfWidgetFormInputFile(array());
   $this->validatorSchema['upload'.$i] = new sfValidatorFile(array())
}

Now, I tried to embed this form to another form:

$form = new UploadForm();
unset($form['created_at'], $form['updated_at'], $form['module'],
$form['entityid'], $form['filename']);
$this->embedForm("upload_fields", $form);

Ok, I browsed some file and clicked Save. The parent form was saved
successful, but the embed upload form created an empty row in the
database very logically, it could not add any useful data to the
table. How can I solve this? Unfortunately, I don't know where i can
overwrite the save function of the upload form...  I know how to save/
store the files with symfony(i've already created a single upload
field), but I don't know where to modify the saving process of the
upload form to store more lines in the table.

Thank you so much!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to