FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Submission Pre-Parser] Rename File
#1
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:

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)