RSForm!Pro - User Profile, Community Builder and Mappings

in Uncategorized, Development, RSForm!Pro on 02 Jun 2015 having 3 comments

An example that uses RSForm!Pro - Joomla! User Registration plugin and the built-in mappings functionality to associate data within the Joomla! User Profile table while also creating the Community Builder user entry.

Introduction

For a while now, RSForm!Pro provides a Joomla! User Registration plugin, which as suggested, can be used to create your very own Joomla! user registration form.

Using the built-in mappings feature we can extend the form's functionality even further by assigning additional data within the standard Joomla! User Profile related table as well as within third party extensions such as Community Builder.

Before starting off, you'll have to firstly create a registration form. Once this is completed and functional, mappings are specified as instructed below.

Joomla! User Profile Mapping

Navigate to backend > Components > RSForm!Pro > Manage Forms > your form > Properties > Mappings and follow these steps:

The example assumes you have an extra field in your form named phone and that you want it to be associated with the according user profile data.

  1. Click on the 'New Query' button.
  2. Set 'Connection type' to "Local".
  3. Set 'Method' to "Insert".
  4. Click on the 'Connect to database' button.
  5. From the 'Database table' dropdown select "#__user_profiles". (`#` would be your Database Tables Prefix)
  6. Set 'user_id (int)' to {global:userid}. (this is a global placeholder and it will be replaced with the newly created user ID)
  7. Set 'profile_key (varchar)' to profile.phone. (this would be the profile_key to which we associate the submitted value. A full list of these keys can be found below.)
  8. Set 'profile_value (text)' to "{phone:value}". (this is the placeholder of our phone field that will return the submitted value.)

Repeat the same procedure for any other User Profile information you would like to map.

'profile_key' Usage
profile.website Website
profile.region Region
profile.postal_code Postal/ZIP Code
profile.phone Phone
profile.favoritebook Favourite Book
profile.dob Date of Birth
profile.country Country
profile.city City
profile.address1 Address 1
profile.address2 Address 2
profile.aboutme About Me
Community Builder Mapping

Navigate to backend > Components > RSForm!Pro > Manage Forms > your form > Properties > Mappings and follow these steps:

The example assumes you want to create the user entry within Community Builder and that you have an extra field in your form named phone which you wish to also be associated with a Community Builder custom field.

  1. Click on the 'New Query' button.
  2. Set 'Connection type' to "Local".
  3. Set 'Method' to "Insert".
  4. Click on the 'Connect to database' button.
  5. From the 'Database table' dropdown select "#__comprofiler". (`#` would be your Database Tables Prefix)
  6. Set 'id (int)' to {global:userid}. (this is a global placeholder and it will be replaced with the newly created user ID)
  7. Set 'user_id (int)' to {global:userid}.
  8. Set 'cb_customfieldname (varchar)' to {phone:value}. (this is the placeholder of our phone field that will return the submitted value.)

Notice:
  • the last step, cb_customfieldname, would be the exact name that Community Builder has generated (you can find this by editing your Community Builder custom field, within the 'Name' textbox).

  • in order to map data to more custom fields, only repeat the last step.

After the form is submitted, the user account that has just been created will also be associated with Community Builder along with the custom field information.

Your Involvement Matters

If there's anything you think that should be implemented in future releases, be it a brand-new feature or an improvement for an existing one, don't hesitate to tell us about it!



Subscribe to our blog

Found this article interesting? Subscribe to our blog for more.



Gravatar
Yvonne Grayson - 02.04.2019 (08:47:47)
Community Builder Data Fill

Is there a way to use pre-existing Community Building data to pre-populate fields in RSForm?

Quote
0

Gravatar
Alexandru Plapana - 10.02.2016 (04:16:56)
@Brady

If you submit a support ticket about this, i am sure that our staff members will provide some assistance with this.

Quote
1

Gravatar
Brady McCain - 09.02.2016 (16:17:56)
id insertion

I'm trying to connect to my Community Builder database. I've tried using the {global:userid} placeholder for `id` and `user_id`. I've also tried using {last_insert_id } since it's the first option to select when I click on the id field. Neither seem to work for me.

Quote
1

1000 Characters left