I have Joomla 3.8.11 and RSFORM 2.0.14.

I want to update the Community Builder fields of the logged-in user.

The main fields that I am trying to update are via some checkboxes: enter image description here

The checkbox field from RSFORM has exactly the same values that the checkbox fields from Community Builder have. enter image description here

enter image description here

I tried this method: https://www.rsjoomla.com/support/documentation/rsform-pro/custom-scripting/update-a-field-from-community-builder.html

And this method: https://www.rsjoomla.com/blog/view/314-rsformpro-user-profile-community-builder-and-mappings.html

But it doesn't work. When I go to see the profile, I don't see the fields updated and there is no error message.

Here is the code that I added in php option "Script called on form process":

$db = JFactory::getDBO();
$user = JFactory::getUser();
$db->setQuery("UPDATE njhggy_comprofiler SET cb_skills = '".$db->escape($_POST['form']['skills'])."' WHERE user_id = '".$db->escape($user->id)."'");

Does anyone know what I am doing wrong?


1 Answer 1


There may or may not be addition issues with your attempt, but I can tell at first glance that you are not executing your UPDATE query.


$db = JFactory::getDBO();
$user = JFactory::getUser();
$db->setQuery("UPDATE #__comprofiler SET cb_skills = " . $db->q($_POST['form']['skills']) . " WHERE user_id = " . (int)$user->id);

or with an object:

$object = (object)['user_id' => JFactory::getUser()->id, 'cb_skills' => $_POST['form']['skills']];
JFactory::getDBO()->updateObject('#__comprofiler', $object, 'user_id');
  • 1
    @Cff you have been online since I posted my answer. Did my answer resolve your issue? If so, do you know how to accept my answer (to stop the system from bumping this page)? If not resolved, do you have any feedback that will assist volunteers in helping you further? Commented Jun 28, 2019 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.