Repost due to bad tag
I want to save files to folders based on the User Id. In this case the UserId is 649
In a custom code block after Submit I have:
<?php
$this->set("mypath",
"G\wamp\www\GoldRibbon\components\com_chronoforms6\chronoforms\uploads\Cust{user:id}");
?>
Using custom code block {var.pr:mypath} this prints out correctly as:
G:\wamp\www\GoldRibbon\components\com_chronoforms6\chronoforms\uploads\Cust649
The Upload Directory Path is set to : {var:mypath}
On an upload I get the error message "Destination directory not available." The folder definitely exists on my computer.
The debugger results are:
Array
(
[option] => com_chronoforms6
[chronoform] => test-copy
[event] => submit
[user_id] =>
[radio8] => n
[file19] => Jennifer A
side1.pdf
[aid] => 25
[text1] => don is here
[button2] =>
[Itemid] =>
)
Array
(
[save_data10] => Array
(
[data] => Array
(
[option] => com_chronoforms6
[chronoform] => test-copy
[event] => submit
[user_id] => 649
[radio8] => n
[file19] => Jennifer A
side1.pdf
[aid] => 25
[text1] => don is here
[button2] =>
[Itemid] =>
[modified] => 2018-05-06
23:06:56
)
[_success] => Data saved
successfully
[log] => Array
(
[0] => UPDATE
`chronoforms_data_test` AS `data8` SET `user_id` = '649', `radio8` = 'n',
`file19` = 'Jennifer A side1.pdf', `text1` = 'don is here', `modified` = '2018-05-06
23:06:56' WHERE `aid` = '25';
)
[var] => Array
(
[user_id] => 649
[radio8] => n
[file19] => Jennifer A
side1.pdf
[text1] => don is here
[modified] => 2018-05-06
23:06:56
)
)
[upload15] => Array
(
[path] => G:\wamp\www\GoldRibbon\components\com_chronoforms6\chronoforms\uploads\Cust649\
[var] =>
)
)
}
I want to save files to folders based on the User Id. In this case the UserId is 649
In a custom code block after Submit I have:
<?php
$this->set("mypath",
"G\wamp\www\GoldRibbon\components\com_chronoforms6\chronoforms\uploads\Cust{user:id}");
?>
Using custom code block {var.pr:mypath} this prints out correctly as:
G:\wamp\www\GoldRibbon\components\com_chronoforms6\chronoforms\uploads\Cust649
The Upload Directory Path is set to : {var:mypath}
On an upload I get the error message "Destination directory not available." The folder definitely exists on my computer.
The debugger results are:
Array
(
[option] => com_chronoforms6
[chronoform] => test-copy
[event] => submit
[user_id] =>
[radio8] => n
[file19] => Jennifer A
side1.pdf
[aid] => 25
[text1] => don is here
[button2] =>
[Itemid] =>
)
Array
(
[save_data10] => Array
(
[data] => Array
(
[option] => com_chronoforms6
[chronoform] => test-copy
[event] => submit
[user_id] => 649
[radio8] => n
[file19] => Jennifer A
side1.pdf
[aid] => 25
[text1] => don is here
[button2] =>
[Itemid] =>
[modified] => 2018-05-06
23:06:56
)
[_success] => Data saved
successfully
[log] => Array
(
[0] => UPDATE
`chronoforms_data_test` AS `data8` SET `user_id` = '649', `radio8` = 'n',
`file19` = 'Jennifer A side1.pdf', `text1` = 'don is here', `modified` = '2018-05-06
23:06:56' WHERE `aid` = '25';
)
[var] => Array
(
[user_id] => 649
[radio8] => n
[file19] => Jennifer A
side1.pdf
[text1] => don is here
[modified] => 2018-05-06
23:06:56
)
)
[upload15] => Array
(
[path] => G:\wamp\www\GoldRibbon\components\com_chronoforms6\chronoforms\uploads\Cust649\
[var] =>
)
)
}