Hi,
using CFv3.2
I have a form with several fields which get stored into a table in a DB after submitting.
One of the fields is a upload file field called upload_file.
1) Would it be possible to change the value before it gets stored.
By the way: I've set "Before E-mail" for "Saving Data/Emails order:" under DB connections just so you know.
Example, you upload: sample.mpeg and click on submit.
With some php code I'm going to try to convert it to for example a mp4.
Now I want to store the new name for example sample_converted.mp4 into that field (or in a hidden field now that I think of it, as long as it gets stored in the database)
You can assume that I will have the new name in a string $newName.
2) Where do I need to put the code to manipulate the current value of a field? Is it in the "On Submit code - before sending email" or "On Submit code - after sending email:" or somewhere else?
3) How do I change the value. What code do I need to use?
Thanks in advance. I would really appreciate some help.
Sago
using CFv3.2
I have a form with several fields which get stored into a table in a DB after submitting.
One of the fields is a upload file field called upload_file.
1) Would it be possible to change the value before it gets stored.
By the way: I've set "Before E-mail" for "Saving Data/Emails order:" under DB connections just so you know.
Example, you upload: sample.mpeg and click on submit.
With some php code I'm going to try to convert it to for example a mp4.
Now I want to store the new name for example sample_converted.mp4 into that field (or in a hidden field now that I think of it, as long as it gets stored in the database)
You can assume that I will have the new name in a string $newName.
2) Where do I need to put the code to manipulate the current value of a field? Is it in the "On Submit code - before sending email" or "On Submit code - after sending email:" or somewhere else?
3) How do I change the value. What code do I need to use?
Thanks in advance. I would really appreciate some help.
Sago