Forums

Load joomla user data into an input box

zetap 24 May, 2017
Hello

I am creating a form with ChronoForms V6, I need to load in an input box of the form the user data joomla, name, email, username.

In ChronoForms V5, I added a "custom code" element in the onload event and with the following php code and I solved it.
     
      <? Php
     $ User = \ JFactory :: getUser ();
     $ Form-> data ['email'] = $ user-> email;
     $ Form-> data ['name'] = $ user-> name;
     $ Form-> data ['username'] = $ user-> username;
     ?>


In ChronoForms V6 I can not find the way to do it can you tell me how to do it?

Thank you very much !
Max_admin 25 May, 2017
Answer
1 Likes
Hi zetap,

Just use this shortcode in your field "value" box: {user:name} or {user:email}..etc

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
zetap 25 May, 2017
Thank you very much, Regards !
This topic is locked and no more replies can be posted.