Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

RSForm!Pro - Autopopulate a field from Community Builder

Autopopulate a field from Community Builder

To populate a field with a value from Community Builder, you will require a script in the Default Value area, for example:

 
//<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 `firstname` FROM `#__comprofiler` WHERE `user_id`='".$userId."'");
    return $db->loadResult();
}
//</code>
 

The above script returns the first name stored in the #__comprofiler table.

Feedback