Skip to main content
Topic: Value of a field as a prefix of an uploaded file (Read 1271 times) previous topic - next topic

Value of a field as a prefix of an uploaded file

Is there a way to include the value of a field as a prefix of an uploaded file?


 

Re: Value of a field as a prefix of an uploaded file

Reply #2
Thanks for your answer. I tried to use a constant like USER_ID and it works but I can't define a "variable" that can be used in the FileNamePrefix option. Can you help me?
What I try is: $varx = $modeldata['fieldname'];. Then, use the $varx as the prefix.

Re: Value of a field as a prefix of an uploaded file

Reply #3
@Ellen‍ that would not work if it is not available to that field. Why the USER_ID worked was because it was defined as a global constant in config.php.