form email plugin

claudiosorgi

New Member
Hi, I wanted to use the email form plugin to send an email to the person who completed the form. One of the elements of the form is the user, but if I put the placeholder element, the system does not send the email because it uses the name and not the email address linked to the user. How should I do?
 
I between the elements of the form , the name of the user who entered the data and I wish saving the form , even with different user logged in , send an email to the user who has entered the datascreensh.png
 
You could either put a second user element on the form set to email and use that, or do "email to eval" ...

Code:
return JFactory::getUser((int)'{yourtable___user_raw}').get('email');

That placeholder is your user element's full name, with _raw appended.

-- hugh
 
Hi Hugh, it's not JS;)

It should be
return JFactory::getUser((int)'{yourtable___user_raw}')->email;
 
LOL! Ooops. Sorry, it's been a very JSey few days.

Actually you can just replace that . with ->. Either will work ... ->email or ->get('email').

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top