Hi all,
I have a Dynamic/nextensio form created as usual.
The form works ok.
The form contains a file field and the upload works. no problem here.
Then I added a Send mail behaviour to send an advice when the user upload a file.
I'm searching for a way to add the file name in the body of the email when I EDIT a record (when I insert a record all works ok).
I can insert almost all info in the email but I cannot get to insert the file name. In fact, the file field is empty when you edit a record.
I tried this tags:
{POST.filename_fil},
{rsfiles.filemane.fil}
{filemane.fil}
But I always get empty file name.
Is there to get the file name in the body of the email?
TIA
ton y
Send file field text by email on UPDATE?
Re: Send file field text by email on UPDATE?
Ok something is wrong somewhere.
If the file fields is empty on update it is obviously not there so the file name will not be sent.
If you look at the database using phpMyAdmin or Navicat, is the file name in the database?
If it is in the db then the next step would be to double check the query and see if the expected results is returned.
Next would be to make sure the dynamic data is populated into the field.
The correct syntax for the email would be {POST.field_id}
If the file fields is empty on update it is obviously not there so the file name will not be sent.
If you look at the database using phpMyAdmin or Navicat, is the file name in the database?
If it is in the db then the next step would be to double check the query and see if the expected results is returned.
Next would be to make sure the dynamic data is populated into the field.
The correct syntax for the email would be {POST.field_id}
Re: Send file field text by email on UPDATE?
Thanks Fred,Fred wrote:If the file fields is empty on update it is obviously not there so the file name will not be sent.
If you look at the database using phpMyAdmin or Navicat, is the file name in the database?
If it is in the db then the next step would be to double check the query and see if the expected results is returned.
Next would be to make sure the dynamic data is populated into the field.
The correct syntax for the email would be {POST.field_id}
The db field is there and filled in.
And after the update it is still there, correctly.
If I change the file, and upload a different file the variable {POST-field_id} is correctly passed to the email.
The variable is empty when I update the record without changing the file field.
Another info: if I drag the file field from the bindings panel to the form, I can see the content regularly.
I altro tried to Bind the file field to the related file field, but nothing changes.
It seems that if the file field is not changed, no variable is passed.
Thanks, anyway, Fred.
tony
Re: Send file field text by email on UPDATE?
You know what... I was talking rubbish.
That field should be empty as it is a file upload field and only populated by clicking the brows button. If you do try to put something in the field the page will try to upload the file.
Just a thought here maybe it will get you on the right track.
Create a variable and assign the value in the db to it.
$current_filename
Then use {GLOBALS.current_filename} to add it to the email.
You will need to first check if a new file is being uploaded.
The easiest way to do that would be to have two email SB's the one having a condition and send on update if {POST.file_name} != ' '
That field should be empty as it is a file upload field and only populated by clicking the brows button. If you do try to put something in the field the page will try to upload the file.
Just a thought here maybe it will get you on the right track.
Create a variable and assign the value in the db to it.
$current_filename
Then use {GLOBALS.current_filename} to add it to the email.
You will need to first check if a new file is being uploaded.
The easiest way to do that would be to have two email SB's the one having a condition and send on update if {POST.file_name} != ' '