I created a file upload form for registered users only. Can I put in the email confirming the upload email and the username user?And I can send you a confirmation email taking the email address directly from the data with which you registered?
Forums
email for upload with username
Hello creositi,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I attach uploaded files to an email?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I attach uploaded files to an email?
P.S: I'm just an automated service😉
Thanks for the guide.
I have been following what is written in the guide but I guess I did something wrong because it does not work.
The form is to upload the file. When he gets the email confirmation of the upload must be written at the bottom:
LOADED USER: username
EMAIL ADDRESS: user email
I plugged in EVENTS a CUSTOM CODE in ON SUBMIT
How MODE I left CONTROLLER, and I have entered the code
<?php
$user =& JFactory::getUser();
?>
After that there is UPLOAD FILE (which works perfectly)
After there is EMAIL
Here I have configured all the mail (that comes). In the template I added this line at the bottom
$form->data['user_email'] = $user->email;
Where did I go wrong? Because when I receive the e-mail administrator, the last line is written just
$form->data['user_email'] = $user->email;
I have been following what is written in the guide but I guess I did something wrong because it does not work.
The form is to upload the file. When he gets the email confirmation of the upload must be written at the bottom:
LOADED USER: username
EMAIL ADDRESS: user email
I plugged in EVENTS a CUSTOM CODE in ON SUBMIT
How MODE I left CONTROLLER, and I have entered the code
<?php
$user =& JFactory::getUser();
?>
After that there is UPLOAD FILE (which works perfectly)
After there is EMAIL
Here I have configured all the mail (that comes). In the template I added this line at the bottom
$form->data['user_email'] = $user->email;
Where did I go wrong? Because when I receive the e-mail administrator, the last line is written just
$form->data['user_email'] = $user->email;
Hi Creositi,
You need all the PHP in the Custom Code event. Only the $form->data array entries are saved for use in other actions.
Bob.
You need all the PHP in the Custom Code event. Only the $form->data array entries are saved for use in other actions.
<?php
$user =& JFactory::getUser();
$form->data['user_email'] = $user->email;
?>
Then use user_email in the Email Dynamic To box; and/or {user_email} in the email template.
Bob.
This topic is locked and no more replies can be posted.