After a long learning curve I am posting this here so that should I need it again in the future or if others need it, it is here for reference.
Project: I needed to load logged in Community Builder users information into a BreezingForm. This included their name, email, complete address and phone. Here is what I did:
First I setup the piece that inserts the Community Builder values into the form:
BreezingForms > Manage Pieces > New
Title: CB_values
Published: Yes
Package: CB Integration
Name: ff_load_CB_values
Type: Before Form
Description: This code inserts the CB user information into the BF form.
Code:
Code:
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Library
$db = JFactory::getDBO();//Get Database Object
$user = &JFactory::getUser();//Get user Object
//Create your own query
$db->setQuery('Select * From #__comprofiler Where id='.$user->id);
$results = $db->loadObject(); //load the results from the query
// populate the values in the form
ff_setValue('name', $results->firstname." ".$results->lastname);
ff_setValue('email', $user->email);
ff_setValue('phone', $results->cb_phone);
ff_setValue('address', $results->cb_address);
ff_setValue('city', $results->cb_city);
ff_setValue('postcode', $results->cb_zipcode);
ff_setValue('country', $results->cb_country);
Save
I created a form that had, in addition to form specific elements, the following elements with the following - Labels : Names (note the only important part is the names as these connect with the code above. Both may be substituted for your own needs however.)
Name : name
Email : email
Address : address
City : city
Province : province
Postal Code : postcode
Country : country
Phone : phone
Next I updated the form to include the integration piece:
Advanced Tab > Form Options > More options
Form Pieces > Before Form > Library
select - CB Integration::ff_load_CB_values
Save
Now when you are logged in and go to your form, the information from your CB profile will be pre-loaded into the form.
If BreezingForms supports Joomlas content prepare usage (content plugins) then you should be able to just substitute the values into your form after installing CB Content Bot.
Kyle (Krileon) Community Builder Team Member Before posting on forums:
Read FAQ thoroughly
+
Read our Documentation
+
Search the forums CB links:
Documentation
-
Localization
-
CB Quickstart
-
CB Paid Subscriptions
-
Add-Ons
-
Forge
-- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
-- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please
send me a private message
with your thread and will reply when possible!
-- Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
-- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
I found your reference to this in another post of yours, but I looked through the BreezingForms forum extensively, and have posted that question to their team as well. As far as I know at the moment, BreezingForms does not support Joomla Content plugins.
I will update this post should I find out differently in the future.
The following user(s) said Thank You: nant, krileon