Hi,
I have 2 CFs. 1 is for joomla registration, and the other is to upload file. The second CF (which is for uploading file) can only be accessed by registered users when they log in.
In my 2nd CF, I only have 2 elements, 1 textbox (file description) and 1 file upload.
But I want to save also the username, name, and email of currently logged in user into the database table that contains results of my 2nd CF, in addition to the file description and the file upload.
I have tried to write
What have I missed?
Please help.
Thank you
I have 2 CFs. 1 is for joomla registration, and the other is to upload file. The second CF (which is for uploading file) can only be accessed by registered users when they log in.
In my 2nd CF, I only have 2 elements, 1 textbox (file description) and 1 file upload.
But I want to save also the username, name, and email of currently logged in user into the database table that contains results of my 2nd CF, in addition to the file description and the file upload.
I have tried to write
<?php
$user = &JFactory::getUser();
JRequest::setVar('name' $user->username);
?>
in OnSubmit code before sending email in Form Code tab. But it won't take the username variable. Instead, there was an error message Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\ISIEM\components\com_chronocontact\libraries\customcode.php(64) : eval()'d code on line 3
What have I missed?
Please help.
Thank you