The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Filename problem - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Filename problem (/showthread.php?tid=2344) |
Filename problem - jpsaenz - Jan 16th, 2013 Hi! i have a form with 4 file-upload fields, and this works fine, but: When the file name already exists, FormTools makes the following: "1_ [filename.jpg]", this is fine, but I need the names to be provided as follows: [submission_id]_[filename.jpg]... and ideally, all characters are written in lowercase. And this: always, not just when the names are identical. Is this possible? I saw that in the "/gobal/code/actions.php" there is a variable "$ upload_tmp_file_prefix" but I want to change that; guess is to put the "1_" 2_ ", etc.. Can i incorporate this variable "submission_id" to the file name? Can you help me? Thanks a lot! (and sorry for my poor english and the google-translation!) Juan Pablo My FormTools Version: 2.2.5., premium RE: Filename problem - Joe - Jan 16th, 2013 Hi Juan, There is no feature through the Form Tools interface that will enable you to append the submission ID to the filename You might want to consider using the Submission Preparser module: http://modules.formtools.org/submission_pre_parser/ Cheers, Joe (Jan 16th, 2013, 2:35 PM)jpsaenz Wrote: Hi! RE: Filename problem - jpsaenz - Jan 17th, 2013 Hi Joe, thank you very much for your answer. I installed the module but I could not make the right rule - this does not work: Code: if ((isset ($ _POST ['portrait']) &&! empty ($ _POST ["portrait"]))) sure: "$portrait" is the fieldname - but i need to manipulate the *filename* (and i don't know how...) thanks for your help! Juan Pablo |