Hi
I just want to build a little form with an upload field.
The path with the Dwonloadlink should be written in the DB.
I tried to do it like described here:
http://www.chronoengine.com/faqs/53-cfv4/cfv4-file-uploads/2681-how-can-i-link-to-an-uploaded-file.html
But insteaed of "$form->files => array" i got some other Code
Tahnk you
I just want to build a little form with an upload field.
The path with the Dwonloadlink should be written in the DB.
I tried to do it like described here:
http://www.chronoengine.com/faqs/53-cfv4/cfv4-file-uploads/2681-how-can-i-link-to-an-uploaded-file.html
But insteaed of "$form->files => array" i got some other Code
Array
(
[pdf_inserat] => Array
(
[name] => 20160309075615_hexdata1.1.0.pdf
[original_name] => hexdata1.1.0.pdf
[path] => M:\xamppserver\xampp_17_ifma\htdocs\17_02_ifma\components\com_chronoforms5\chronoforms\uploads\meldeform_intern_02_stellenboerse\20160309075615_hexdata1.1.0.pdf
[size] => 843065
[link] => http://localhost/17_02_ifma/components/com_chronoforms5/chronoforms/uploads/meldeform_intern_02_stellenboerse/20160309075615_hexdata1.1.0.pdf
)
)
Tahnk you
Hi galbur,
That is the contents of the $form->files array. You want to copy the [Please post a link to the form so I can take a quick look. entry to the $form->data array so that it can be saved.
Are you sure that you need to save the URL? Usually just the file name (and perhaps a folder name) is enough as you can always re-build the URL or path from that data.
Bob
That is the contents of the $form->files array. You want to copy the [Please post a link to the form so I can take a quick look. entry to the $form->data array so that it can be saved.
Are you sure that you need to save the URL? Usually just the file name (and perhaps a folder name) is enough as you can always re-build the URL or path from that data.
Bob
Hi Bob
Thank you very much! (once again)
This is the link to the form:
http://ifma2.allerhand.ch/index.php/de/?option=com_chronoforms5&chronoform=meldeform_intern_02_stellenboerse
I'm not shure, what the custom code should be...
Bye
Christoph
Thank you very much! (once again)
This is the link to the form:
http://ifma2.allerhand.ch/index.php/de/?option=com_chronoforms5&chronoform=meldeform_intern_02_stellenboerse
I'm not shure, what the custom code should be...
Bye
Christoph
Hi galbur,
In a Custom Code action after the Files Upload action and before the DB Save action add code like this
Replace 'file_link' with the name of the table column where you want to save the link.
Bob
In a Custom Code action after the Files Upload action and before the DB Save action add code like this
<?php
$form->data['file_link'] = $form->files['pdf_inserat']['link'];
?>
Replace 'file_link' with the name of the table column where you want to save the link.
Bob
This topic is locked and no more replies can be posted.