I looked on the forum threads, there is information only on an arbitrary name of uploaded files or attach to email.
My problem is as follows. In the form the user fills in the text box and sequentially loads the different files. However, the file field allows you to specify only the static path upload. Please help us to realize that at the push of a button create a folder by name in the text box and the files is loaded into it.
Translated by Google. Sorry and thanks.
1090x629(59.13 kB)
1090x596(61.22 kB)
910x623(27.44 kB)
My problem is as follows. In the form the user fills in the text box and sequentially loads the different files. However, the file field allows you to specify only the static path upload. Please help us to realize that at the push of a button create a folder by name in the text box and the files is loaded into it.
Translated by Google. Sorry and thanks.
1090x629(59.13 kB)
1090x596(61.22 kB)
910x623(27.44 kB)
Hi GreyHead,
I read the FAQ, you specified earlier, tried to deal with it, but it did not work.
And now, having studied the details did not work. As for instructions before upload_file the posted custom code v.5:
Instead of 77, I wrote a number 4 (action in the Wizard, the screenshot above).
Instead of "FULL_PATH_TO_FILE", I wrote a "D:\ServerWebNew\OpenServer\domains\MySite.com" my path.
But a feeling that this code bypasses.
957x2322(68.71 kB)
[attachment=0]2016-12-14_123931.jpg[/attachment]
I read the FAQ, you specified earlier, tried to deal with it, but it did not work.
And now, having studied the details did not work. As for instructions before upload_file the posted custom code v.5:
<?php
$user = JFactory::getUser();
$form->actions_config[77]["upload_path"] = "FULL_PATH_TO_FILE".DS.$user->get('username').DS;
?>
Instead of 77, I wrote a number 4 (action in the Wizard, the screenshot above).
Instead of "FULL_PATH_TO_FILE", I wrote a "D:\ServerWebNew\OpenServer\domains\MySite.com" my path.
But a feeling that this code bypasses.
957x2322(68.71 kB)
[attachment=0]2016-12-14_123931.jpg[/attachment]
Hi Gugo,
In your screenshot the id of the Files Upload action is 1 (not 4) and the Custom Code action needs to be before the Files Upload action.
Bob
In your screenshot the id of the Files Upload action is 1 (not 4) and the Custom Code action needs to be before the Files Upload action.
Bob
my problem was that I took ID number of upload field from a wizard, but it was necessary from settings. According to your instruction has corrected an error. Also has added a code.
Everything began to work according to a task. It is possible to specify the name of the created folder in a text field and files are uploaded into it.
Many thanks, GreyHead and support FAQ.
<?php
$form->actions_config[1]["upload_path"] =JPATH_SITE.DS.$form->data('text1').DS;
?>
Everything began to work according to a task. It is possible to specify the name of the created folder in a text field and files are uploaded into it.
Many thanks, GreyHead and support FAQ.
This topic is locked and no more replies can be posted.
