• 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: Display user full name in the form

Display user full name in the form 10 years 1 month ago #26672

  • tz
  • tz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
Hi!

I am creating a form where workers can submit their working times to their boss.
Every worker gets an own Joomla login. So I want to display the user name in the form. They have to accept a checkbox in the end like, "I, "user full name", confirm these times are true".

I managed to get the user name as a default value for a text field, but then this field is changable. I just want to display it as plain text. Is there a way to do this?
The administrator has disabled public write access.

Display user full name in the form 10 years 1 month ago #26695

  • danilofagundes
  • danilofagundes's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Thank you received: 5
Add this snippet to the Defaul Value box for RSForm field.
This will prefill the field with the logged in users' username.
//<code>
$formuser=JFactory::getUser();
return $formuser->name;
//</code>

Add this snippet to the Additional Attributes box for RSForm field.
This will block editing the field.
readonly="readonly"

Best regards!
Danilo
The administrator has disabled public write access.

Display user full name in the form 10 years 1 month ago #26947

  • jawadakr
  • jawadakr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
is it possible to use a query to get a user object in php script tab using "on form display" and then access that user object in the form fields or do i have to run the same query every time for each field.

thank you

jawad
The administrator has disabled public write access.

Display user full name in the form 6 years 4 weeks ago #38035

  • kris6
  • kris6's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
I tried this solution and it is resulting in absolutely nothing. Has something changed since this time that prevents showing us from pulling in the current user of whom is editing the record? I can see the user who created the record but am unable to get notified by the user who edits the record. I am needing this for reporting for a multimillion dollar company.
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!