With RSForm!Pro you can display variables like user information (if the user is logged in) directly in the form components that you create.
Examples:
Assuming that you want to create an e-mail form component, and by default, if the user is logged in, to enter it's registration e-mail in the Email field. Here's how to do it:
- Create a textbox component
- In the Default Value, type this code:
//<code>
$rsuser=JFactory::getUser();
$user=$rsuser->get('email');
return $user;
//</code>
This piece of code (including the // tags) loads the user information in the $user variable. Here's what you can use:
- $rsuser->get('id') = user id
- $rsuser->get('username') = the username
- $rsuser->get('name') = registration full name
- $rsuser->get('email') = registration email





