The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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!

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 - 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"])))
{
   $ _POST["portrait"] = "{$ _POST["submission_id"]}_{$ _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