Jan 17th, 2013, 9:12 AM
Hi!
i need to rename the files in my form. These are saved with the same name like the original file, except for those where the filename already exists: FormTools turns it into "1_filename.jpg", etc.
i need to incorporate the submission ID in the filename, like this:
"submission_id_filename.jpg"
I installed the Pre-Parser module but I could not make the right rule - this does not work:
is obvious: "$portrait" is the fieldname - but i need to manipulate the *filename* (and i don't know how...)
Can someone help me with this?
Thanks!
Juan Pablo
i need to rename the files in my form. These are saved with the same name like the original file, except for those where the filename already exists: FormTools turns it into "1_filename.jpg", etc.
i need to incorporate the submission ID in the filename, like this:
"submission_id_filename.jpg"
I installed the Pre-Parser module but I could not make the right rule - this does not work:
Code:
if ((isset ($ _POST ['portrait']) &&! empty ($ _POST ["portrait"])))
{
$ _POST["portrait"] = "{$ _POST["submission_id"]}_{$ _POST["portrait"]}";
}
is obvious: "$portrait" is the fieldname - but i need to manipulate the *filename* (and i don't know how...)
Can someone help me with this?
Thanks!
Juan Pablo