• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: how preload data from logged-in user new form?

how preload data from logged-in user new form? 1 month 1 week ago #44270

I want to make a form for registred users to subscribe for a certain event. I would like to preload 3 textfields (username, email and name) with the data from the logged-in registred user in my new form. Can anyone help me?

Grtz from Belgium
The administrator has disabled public write access.

how preload data from logged-in user new form? 1 month 1 week ago #44272

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • RSJoomla! Official Staff
  • Posts: 682
  • Thank you received: 130
Hello,

You can check this article.
The administrator has disabled public write access.

how preload data from logged-in user new form? 1 week 4 days ago #44283

  • iceferret
  • iceferret's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 277
  • Thank you received: 74
I would use this in the 'pre processing/scripts called before form is generated

<?php
$user = Joomla\CMS\Factory::getUser();
 
$val['email']    = $user->get('email');
$val['username'] = $user->get('username');
$val['name']     = $user->get('name');

If you need to change the $val[....] variables to suit your own field names
If you can keep your head when all about you are losing theirs, you obviously don't understand the situation!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!