• 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: Syntax for username logged in?

Syntax for username logged in? 12 years 10 months ago #14107

Hello,
can the username depending of the user logged in (ex. skullmonkey) be used to customize the form. What is the syntax for it?
ex. This form is send by {username} from {city:caption}.
to get: This form is send by skullmonkey from Skopje.

Thanks,
S@
Last Edit: 12 years 10 months ago by skullmonkey.
The administrator has disabled public write access.

Re:Syntax for username logged in? 12 years 10 months ago #14112

No one...? Is this even possible?

S@
The administrator has disabled public write access.

Re:Syntax for username logged in? 12 years 10 months ago #14131

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 729
  • Thank you received: 59
Hello,

If I understand correctly you want to display the username of the currently logged in user in the message that is shown on the form page? This can be achieved with some custom scripting. You could try using an unique string in the message, for example: "This form is sent by #$#...", retrieve the currently logged in user's username with the following code:
$user = JFactory::getUser();
$un = $user->username;

then use the str_replace() function in order to replace the unique string with the actual username when the page is loaded ("Scripts called on form display"):
$formLayout = str_replace('#$#',$un,$formLayout);
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!