• 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: Autopopulate data from CB

Autopopulate data from CB 9 years 2 months ago #34437

  • mark63
  • mark63's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
I have designed a form to collect entries for a dog sport I am involved in.
The users profile data is stored via Community Builder and the RSform fields are populated using this code.
//<code>
$user   = JFactory::getUser();
$db   = JFactory::getDbo();
$userId  = $user->get('id');
 
// Is the user logged in?
if ($userId) {
  // Grab the value from the database.
    $db->setQuery("SELECT `cb_dogsname1` FROM `#__comprofiler` WHERE `user_id`='".$userId."'");
    return $db->loadResult();
}
//</code>
All works as it should.

The problem i have is that some of the users have two or more different dogs, Although the dogs details are stored in the profile they have different field names. I need to find a way of switching between the two dogs (only one dog per entry form). Has anyone got any suggestions ?
Cheers
Mark
Last Edit: 9 years 2 months ago by mark63.
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!