Integration of Breezing Form & SugarCRM/ SuiteCRM

  • Rajneesh
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 53
  • Thank you received: 0

Rajneesh replied the topic: Has anyone succeeded in intergrat'g BF & SugarCRM?

Capturing Breezing Form Record ID - SOLVED!

Dear Tome,

Thanks once again. We succeeded in capturing the record ID. Here is the sequence of steps:

Step-1:
Go to Form Pieces>Before Form>custom and add the following code:
//Capturing Breezing Form record ID
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Libraries
$db = JFactory::getDBO(); //Include Database Object

//Create database query
$query = 'SELECT MAX(id) FROM dbluminisin_facileforms_records'; 

//Query the database
$db->setQuery($query);
$result = intval($db->loadResult()) + 1;

//Assign value to form element
ff_setValue('recordID', $result);  // You need to create a hidden input in form with name 'recordID'. (Mandatory)
//Capturing Breezing Form record ID ends here

Step-2:
Go to your form itself and create a 'hidden input' field, which need to have the name 'recordID' (mandatory). Here is an example:


Step-3:
Go to Submit Pieces>End Submit>custom and add the following code to your original code meant for SuiteCRM/SugarCRM
<input type="hidden" name="breezing_form_rec_id_c" value="'.htmlentities( ff_getSubmit('recordID') ).'"/>

As a result, the composite code for Submit Pieces>End Submit>Custom is:
//The following section is meant for passing the variables to SugarCRM or SuiteCRM's table Leads and needs to be added to 'Submit pieces' section of the your Breezing Form

$this->execPieceByName('ff_InitLib');
echo '
<form id="myresubmit" action="/suitecrm/index.php?entryPoint=WebToPersonCapture" method="POST" name="myresubmit" >
<input name="campaign_id" id="campaign_id" type="hidden" value="13f62ae3-f38d-fe80-a93a-57wrr5670f4b7d" />
<input name="assigned_user_id" id="assigned_user_id" type="hidden" value="1" />
<input name="moduleDir" id="moduleDir" type="hidden" value="Leads" />
<input type="hidden" name="first_name" value="'.htmlentities( ff_getSubmit('first_name') ).'"/>
<input type="hidden" name="last_name" value="'.htmlentities( ff_getSubmit('last_name') ).'"/>
<input type="hidden" name="email1" value="'.htmlentities( ff_getSubmit('email1') ).'"/>

<input type="hidden" name="breezing_form_rec_id_c" value="'.htmlentities( ff_getSubmit('recordID') ).'"/>

<input type="hidden" name="somefield4" value="'.htmlentities( ff_getSubmit('somefield4') ).'"/>
<input type="hidden" name="somefield5" value="'.htmlentities( ff_getSubmit ('somefield5') ).'"/>
<input type="hidden" name="somefield6" value="'.htmlentities( ff_getSubmit ('somefield6') ).'"/>
<!-- and so on ... -->
</form>

<script>
     document.getElementById("myresubmit").submit();
</script>
';

//Section Ends Here

exit;
//You always have to exit the script at the end of  'Submit pieces - End Submit' 

That's about it!

Tome, any idea about capturing the values of multiple selection from checkbox group?

With thanks,

RK
#183066
Attachments:
  • Posts: 6478
  • Karma: 170
  • Thank you received: 667

tomeperica replied the topic: Has anyone succeeded in intergrat'g BF & SugarCRM?

There you go :)

Regarding checkbox value passing, it will require some time for us to search for best solution.

Once again I encourage you to search for possible solution ;)

Regards,
Tome

Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
#183068
  • Posts: 6
  • Thank you received: 0

ViralInNature replied the topic: Has anyone succeeded in intergrat'g BF & SugarCRM?

Can't get it to work but I think the problem is I have Joomla and SuiteCRM installed in different databases but same server. What code would I add?
#206869
  • Rajneesh
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 53
  • Thank you received: 0

Rajneesh replied the topic: Has anyone succeeded in intergrat'g BF & SugarCRM?

Dear buddy,

your assumption is wrong !

Joomla as CMS is .....OK
SuiteCRM database is separate from Joomla's database.........OK
Webserver is same..........OK

I have already shared the whole code over here in previous posts wherein mentioned the step-by-step way to follow, but it does not mean pure copy-n-pasting. Take it as a guide!

You may have to identify your user ID and replace it in the code mentioned above. Equally important to have created your campaign first and have its ID and replace it in the code above.

Above suggestion is meant only to encourage you to get the pointers.

Solution has already been implemented.

Kindly dig a little deeper.

With thanks,

Rajneesh
#206873
  • Posts: 6
  • Thank you received: 0

ViralInNature replied the topic: Has anyone succeeded in intergrat'g BF & SugarCRM?

OK well I moved my SuiteCRM PHPMyAdmin over to my Joomla anyways. But still can't get it to work and I've been this thread over and over for the last 3 weekends now. Thought I followed instructions to a T. Totally stuck, any help is appreciated.
I must be getting the variable wrong, when I fill out the form it updates on BreezingForms but not CRM. Here's the exact steps and code I did:

Step-1:
Go to Form Pieces>Before Form>custom and add the following code: (In Joomla)
//Capturing Breezing Form record ID
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Libraries
$db = JFactory::getDBO(); //Include Database Object

//Create database query
$query = 'SELECT MAX(id) FROM joomla_facileforms_records'; 

//Query the database
$db->setQuery($query);
$result = intval($db->loadResult()) + 1;

//Assign value to form element
ff_setValue('recordID', $result);  // You need to create a hidden input in form with name 'recordID'. (Mandatory)
//Capturing Breezing Form record ID ends here
I changed the part highlighted in red $query = 'SELECT MAX(id) FROM joomla_facileforms_records';

Step-2:
Go to your form itself and create a 'hidden input' field, which need to have the name 'recordID' (mandatory).
Did exactly that and used the same recordID

Go to Submit Pieces>End Submit>custom and add the following code to your original code meant for SuiteCRM/SugarCRM
//The following section is meant for passing the variables to SugarCRM or SuiteCRM's table Leads and needs to be added to 'Submit pieces' section of the your Breezing Form

$this->execPieceByName('ff_InitLib');
echo '
<form id="WebToLeadForm" action="http://viralinnature.com/crm/index.php?entryPoint=WebToPersonCapture" method="POST" name="WebToLeadForm">
<input name="campaign_id" id="campaign_id" type="hidden" value="c099d5be-6a65-2b28-8dde-599aa9c6fdc1" /> 
<input name="redirect_url" id="redirect_url" type="hidden" value="http://viralinnature.com/thank-you" /> 
<input name="assigned_user_id" id="assigned_user_id" type="hidden" value="1" /> 
<input name="moduleDir" id="moduleDir" type="hidden" value="Leads" />
<input type="hidden" name="name" value="'.htmlentities( ff_getSubmit('last_name') ).'"/>
<input type="hidden" name="company" value="'.htmlentities( ff_getSubmit('company_c') ).'"/>
<input type="hidden" name="website" value="'.htmlentities( ff_getSubmit('website') ).'"/>

<input type="hidden" name="copy_contact" value="'.htmlentities( ff_getSubmit('recordID') ).'"/>

<input type="hidden" name="city" value="'.htmlentities( ff_getSubmit('primary_address_city') ).'"/>
<input type="hidden" name="email" value="'.htmlentities( ff_getSubmit ('email1') ).'"/>
<input type="hidden" name="phone" value="'.htmlentities( ff_getSubmit ('phone_mobile') ).'"/>
<input type="hidden" name="message" value="'.htmlentities( ff_getSubmit ('message_c') ).'"/>
<!-- and so on ... -->
</form>

<script>
     document.getElementById("bool_id").submit();
</script>
';

//Section Ends Here

I copied and pasted this code directly from the form my CRM generated
<form id="WebToLeadForm"..........to..........type="hidden" value="Leads" />

The blue is what I took from breezingforms, orange is from CRM.
<input type="hidden" name="company" value="'.htmlentities( ff_getSubmit('company_c') ).'"/>

Changed this
document.getElementById("myresubmit").submit();
to this
document.getElementById("bool_id").submit();
#206874
  • Rajneesh
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 53
  • Thank you received: 0

Rajneesh replied the topic: Has anyone succeeded in intergrat'g BF & SugarCRM?

Your form ID is <form id="WebToLeadForm"...........

your submission snippet should be:
document.getElementById("WebToLeadForm").submit();

TEST it

Rajneesh
#206875
Moderators: ForumSupporttomeperica
Time to create page: 0.203 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here