• 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: prefill fields with registered username and email

prefill fields with registered username and email 13 years 1 month ago #13306

  • wsegovia
  • wsegovia's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hey form friends,

I'm using RSForm! and after spending a lot of time in a trial-error method I could finally get my form work prefilling username and email fields with username and email of Joomla users.

I am using Joomla 1.5.23 and RSForm! 1.0.6.
Do not forget to place this code in "Script called on form display" section.
$my = & JFactory::getUser();
 
foreach($fields as $i=>$field){
  if($field->name=='name_fieldname') $fields[$i]->default_value = $my->name;
  if($field->name=='email_fieldname') $fields[$i]->default_value = $my->email;
}

Thanks.
Last Edit: 13 years 1 month ago by wsegovia.
The administrator has disabled public write access.

Re:prefill fields with registered username and email 13 years 4 weeks ago #13404

I just tried this and the information was not in the fields do they need to be of a certain type?
The administrator has disabled public write access.

Re:prefill fields with registered username and email 13 years 2 weeks ago #13501

  • ejdrake
  • ejdrake's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
This did not work for me either.
Got an error on line 3.
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!