• 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 to Pre-Fill Joomla Name

How to Pre-Fill Joomla Name 16 years 9 months ago #4114

Hi,

I'm using the code here in the default text input for my form field:
//<code>
$user = $RSadapter->user();
return $user['email'];
//</code>
http://www.rsjoomla.com/index.php/rsformpro.custom_code.default-value/Display-php-variables-by-default-when-form-is-shown.html
This works great, but I want to also pre-populate the Name field from the Joomla User.

What should I be using for this?
I tried some of the code used in this thread but it did not work for me.
http://www.rsjoomla.com/index.php/RSform-Scripts/1648-Pre-fill-Name-email-address-if-user-is-logged-in.html

Surely I just need to modify the code above slightly?
Using Joomla 1.5.x
The administrator has disabled public write access.

Re:How to Pre-Fill Joomla Name 16 years 8 months ago #4129

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
first is it Pro, or Lite version ?
Component RS SHow Form in build
The administrator has disabled public write access.

Re:How to Pre-Fill Joomla Name 16 years 8 months ago #4132

Sorry It's RSForms Pro
The administrator has disabled public write access.

Re:How to Pre-Fill Joomla Name 16 years 8 months ago #4398

I found the following link to be helpful as it shows the variables.

www.rsjoomla.com/index.php/rsformpro.cus...ode/Custom-code.html

It worked for me in populating the Name and email information in the 1.0.x version and RSform!Pro

$user = user id
$user = the username
$user = registration full name
$user = registration email<br><br>Post edited by: bmckenzie, at: 2008/08/21 00:06
The administrator has disabled public write access.

Re:How to Pre-Fill Joomla Name 16 years 1 month ago #6872

  • toby2
  • toby2's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Why is this code not working? Im am on J 1.0 with Rs Forms PRO:
Code:
//<code>
$user = $RSadapter->user();
return $user;
//</code>

Inserted code into default values, but the form field is still showing up empty for loggedin user.
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!