Hi,
I know this question has been asked before but I can't seem to find a solution in the other posts or tutorials.
I have a form with a file upload that posts the data and upload to a table and then sends it as an email. The email works fine with the attachment but the attachment url won't post to the table. I've made sure the name and ID of the Upload element are the same as the table row name. I have the Upload Files action before DB Save or any other actions On Submit. I can see the images are being stored in the uploads folder through ftp.
I just can't figure it out and would really appreciate your help. So thanks in advance.
This is what is getting posted by the debugger:
I know this question has been asked before but I can't seem to find a solution in the other posts or tutorials.
I have a form with a file upload that posts the data and upload to a table and then sends it as an email. The email works fine with the attachment but the attachment url won't post to the table. I've made sure the name and ID of the Upload element are the same as the table row name. I have the Upload Files action before DB Save or any other actions On Submit. I can see the images are being stored in the uploads folder through ftp.
I just can't figure it out and would really appreciate your help. So thanks in advance.
This is what is getting posted by the debugger:
Data Array:
Array
(
[chronoform] => test_form_01
[event] => submit
[Itemid] => 463
[option] => com_content
[view] => article
[id] => 921
[name] => Ed
[email] =>
ed.hatricksmith@gmail.com
[message] => Test message
[upload_01] => 20130709233209_wg_blurred_backgrounds_3.jpg
[submit] => Submit
[4a4f88e0556db524399f57d36f625091] => 1
[_PLUGINS_] => Array
(
[upload_files] => Array
(
[upload_01] => Array
(
[name] => 20130709233209_wg_blurred_backgrounds_3.jpg
[original_name] => wg_blurred_backgrounds_3.jpg
[path] => /var/www/catchwebsite-dev.catchsoftware.net/public_html/components/com_chronoforms/uploads/test_form_01/20130709233209_wg_blurred_backgrounds_3.jpg
[size] => 23112
[link] => http://catchwebsite-dev.catchsoftware.net/components/com_chronoforms/uploads/test_form_01/20130709233209_wg_blurred_backgrounds_3.jpg
)
)
)
[chronoform_data] => Array
(
[cf_uid] => a1b6b26a7400b731f6f32f92d7e0006d
[cf_created] => 2013-07-09 23:32:09
[cf_created_by] => 0
[cf_ipaddress] => 103.29.30.42
[cf_user_id] => 0
[chronoform] => test_form_01
[event] => submit
[Itemid] => 463
[option] => com_content
[view] => article
[id] => 921
[name] => Ed
[email] =>
ed.hatricksmith@gmail.com
[message] => Test message
[upload_01] => 20130709233209_wg_blurred_backgrounds_3.jpg
[submit] => Submit
[4a4f88e0556db524399f57d36f625091] => 1
[_PLUGINS_] => Array
(
[upload_files] => Array
(
[upload_01] => Array
(
[name] => 20130709233209_wg_blurred_backgrounds_3.jpg
[original_name] => wg_blurred_backgrounds_3.jpg
[path] => /var/www/catchwebsite-dev.catchsoftware.net/public_html/components/com_chronoforms/uploads/test_form_01/20130709233209_wg_blurred_backgrounds_3.jpg
[size] => 23112
[link] => http://catchwebsite-dev.catchsoftware.net/components/com_chronoforms/uploads/test_form_01/20130709233209_wg_blurred_backgrounds_3.jpg
)
)
)
[cf_id] => 20
)
[chronoform_data_cf_id] => 20
)
Validation Errors:
Array
(
)
Thanks for that Ed. We'll get back!
Debug Data
Upload routine started for file upload by : upload_01
/var/www/catchwebsite-dev.catchsoftware.net/public_html/components/com_chronoforms/uploads/test_form_01/20130709233209_wg_blurred_backgrounds_3.jpg has been uploaded successfully.
email
1
Result
An email has been SENT successfully from (Ed) ed.hatricksmith@gmail.com to ed.hatrick-smith@catchsoftware.com
Body
Name Ed
Email ed.hatricksmith@gmail.com
Message Test message
Upload 20130709233209_wg_blurred_backgrounds_3.jpg
Attachments
array ( 0 => '/var/www/catchwebsite-dev.catchsoftware.net/public_html/components/com_chronoforms/uploads/test_form_01/20130709233209_wg_blurred_backgrounds_3.jpg', )
Hi ED,
It looks as though the file name is being saved. Which column do you want to save the URL in?
Bob
It looks as though the file name is being saved. Which column do you want to save the URL in?
Bob
Thanks for replying GreyHead.
I think I have found the problem. Basically, the upload Field title and Field value were not displaying in the table. I had thought that if I created a table and used the same name, when I save it it would overwrite the old table fields but it doesn't seem to do that. I had to create a table with a new name for all the fields to show.
Is there a way to remove unused tables?
I also used this method from another of your posts to add the url to the DB:
Very helpful, so thank you so much for that.
I think I have found the problem. Basically, the upload Field title and Field value were not displaying in the table. I had thought that if I created a table and used the same name, when I save it it would overwrite the old table fields but it doesn't seem to do that. I had to create a table with a new name for all the fields to show.
Is there a way to remove unused tables?
I also used this method from another of your posts to add the url to the DB:
<?php
$form->data['file_url'] = $form->data['_PLUGINS_']['upload_files']['upload_file']['link'];
?>
Very helpful, so thank you so much for that.
This topic is locked and no more replies can be posted.