Integration of Breezing Form & SugarCRM/ SuiteCRM

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

Rajneesh created the topic: Integration of Breezing Form & SugarCRM/ SuiteCRM

I created a BF with the able helping hand of tomeperica and pedro81 lately. The form is fantastic and currently working greatly:
<URL removed>
Since the company has implemented SuiteCRM which is a fork of SugarCRM 6.5 CE, I needed to pass the data from BF to Leads of SugarCRM/SuiteCRM. I have searched the forum here manytimes, but didn't find the good instructions about how to do it. There was an attempt to solve this 5 years back at the following post:
crosstec.org/en/forums/3-breezingforms-f...er-registration.html

But still could not furnish the clear instructions for users. It looks like the issue has never been settled by anyone since then.

I don't want to loose the form created in BF. I love this form.

I have already created a WebToLead Form in SuiteCRM/SugarCRM, thus have all the id of campaign, assigned user etc.

Can someone who have succeeded in solving this puzzle, help me?

With thanks,

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

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

Hey there,

did you check this topic: crosstec.org/en/support/online-documenta...o-different-url.html

Also this one is related to passing values via URL query: crosstec.org/en/forums/40-club-forums-su....html?start=6#175088

Maybe that can help you achive desired result.

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!
#182564
  • 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 Tome,

I had gone through the sample code given there at URL: crosstec.org/en/support/online-documenta...o-different-url.html

I see 'Access Denied' w.r.t., other URL you'd shared.

However, following the first post, I have inserted the following code snippet in 'Submit pieces':
//The following section is meant for passing the variables to SuiteCRM's table Leads
$this->execPieceByName('ff_InitLib');
echo '
<form id="myresubmit" action="http://localhost/SuiteCRM/index.php?entryPoint=WebToPersonCapture" method="POST" name="myresubmit" >
<input name="campaign_id" id="campaign_id" type="hidden" value="13f62ae3-f38d-fe80-a93a-57d47uyt47d" />
<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') ).'"/>

</form>
<script>
     document.myresubmit.submit();
</script>
';
//Section Ends Here

But it does not work.

Note: The above snippet takes the code from one WebToLeadForm which I have successfully created with SuiteCRM. That form is fully functional, but would have objective of catering blog-subscriptions at live website. But that form has its own submit button which corressponds to its own function submit_form().

What should I do?

With thanks,

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

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

Hey there,

well the problem here starts on SugarCRM side(I mean you should go through their documentiation to see how to catch values from URL query), sry but we do not know how they pulling values from URL query. For sure you need to have something like this example, this is basic PHP:
$name =$_POST['first_name'];
$lname =$_POST['last_name'];
$email =$_POST['email1'];

If you test this example: crosstec.org/en/support/online-documenta...o-different-url.html
with 2 BreezingForms Forms you will see its working. So lets say you have Form 1 with 3 fields:

Name, Email, Town and then putting the code from Doc example into End Submit Pieces:
$this->execPieceByName('ff_InitLib');
echo '
<form name="myresubmit" action="http://localhost/joomla/index.php/en/db-test" method="POST">
     <input type="hidden" name="name" value="'.htmlentities( ff_getSubmit('name') ).'"/>
     <input type="hidden" name="email" value="'.htmlentities( ff_getSubmit ('email') ).'"/>
     <input type="hidden" name="town" value="'.htmlentities( ff_getSubmit ('town') ).'"/>
     <!-- and so on ... -->
</form>
<script>
     document.myresubmit.submit();
</script>
';
exit;

Here http://localhost/joomla/index.php/en/db-test is my Form 2 which will collect those values. Also in Form 2 you need to have that fields also and you will need to set this code in Form Pieces -> Before Form:
$this->execPieceByName('ff_InitLib');
$name =$_POST['name'];
$email =$_POST['email'];
$town =$_POST['town'];

ff_setValue('name',$name);
ff_setValue('email',$email);
ff_setValue('town',$town);

And thats it. ff_setValue comes from BreezingForms Library.

So thats the basic of transfering values in BF, I suggest you to read SugarCRM Documentation hwo to catch URL query values.

Hope this helps.

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!
#182602
  • 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 Tome,

I am attaching the complete code of a 'WebToLead' Form created in SuiteCRM/SugarCRM.
 	<html lang='en_us'><head><base target=”_parent” /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><style type="text/css"><!--
 	form#WebToLeadForm, form#WebToLeadForm * {margin: 0; padding: 0; border: none; color: #333; font-size: 12px; line-height: 1.6em; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;}
 	form#WebToLeadForm {float: left; border: 0px solid #ccc; margin: 10px;}
 	form#WebToLeadForm h1 {font-size: 32px; font-weight: bold; background-color: rgb(60, 141, 188); color: rgb(247, 247, 247); padding: 10px 20px;}
 	form#WebToLeadForm h2 {font-size: 20px; font-weight: normal; background-color: rgb(255, 255, 255); color: rgb(68, 68, 68); padding: 10px 20px;}
 	form#WebToLeadForm h3 {font-size: 12px; font-weight: bold; padding: 10px 20px;}
 	form#WebToLeadForm h4 {font-size: 10px; font-weight: bold; padding: 10px 20px;}
 	form#WebToLeadForm h5 {font-size: 8px; font-weight: bold; padding: 10px 20px;}
 	form#WebToLeadForm h6 {font-size: 6px; font-weight: bold; padding: 10px 20px;}
 	form#WebToLeadForm p {padding: 10px 20px;}
 	form#WebToLeadForm input,
 	form#WebToLeadForm select,
 	form#WebToLeadForm textarea {border: 1px solid #ccc; display: block; float: left; min-width: 170px; padding: 5px;}
 	form#WebToLeadForm select {background-color: white;}
 	form#WebToLeadForm input[type="button"],
 	form#WebToLeadForm input[type="submit"] {background-color: #3267C6; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bold; color: #ffffff; display: inline; float: none; padding: 5px 10px; width: 200px; min-width: auto;}
 	form#WebToLeadForm input[type="checkbox"],
 	form#WebToLeadForm input[type="radio"] {width: 18px; min-width: auto;}
 	form#WebToLeadForm div.col {display: block; float: left; width: 330px; padding: 10px 20px;}
 	form#WebToLeadForm div.clear {display: block; float: none; clear: both; height: 0px; overflow: hidden;}
 	form#WebToLeadForm div.center {text-align: center;}
 	form#WebToLeadForm div.buttons {padding: 10px 0; border-top: 1px solid #ccc; background-color: #ffffff}
 	form#WebToLeadForm label {display: block; float: left; width: 160px; font-weight: bold;}
 	form#WebToLeadForm span.required {color: #FF0000;}
 	--></style>
 	<!-- TODO ???
 	<script type="text/javascript" src='http://localhost/suitecrm/cache/include/javascript/sugar_grp1.js?v=WCpISilUvngJZgJBZ4o1BA'></script>
 	--><form id="WebToLeadForm" action="http://localhost/suitecrm/index.php?entryPoint=WebToPersonCapture" method="POST" name="WebToLeadForm">
 	 <h2>FREE Blog Subscriptions</h2>
 	<p style="text-align: center;">Submitting this form will add you to Blog Subscription Lists. You will receive email about each new post as soon as published.</p>
 	<p><img src="http://localhost/images/banners/LeadManagement/Blog-Subscription-image.png" alt="" /></p>
 	<div class="row">
 	<div class="col"><label>First Name: <span class="required">*</span></label><input name="first_name" id="first_name" type="text" required="" /></div>
 	<div class="col"> </div>
 	<div class="clear"> </div>
 	</div>
 	<div class="row">
 	<div class="col"><label>Last Name: <span class="required">*</span></label><input name="last_name" id="last_name" type="text" required="" /></div>
 	<div class="col"> </div>
 	<div class="clear"> </div>
 	</div>
 	<div class="row">
 	<div class="col"><label>Email Address: <span class="required">*</span></label><input name="email1" id="email1" type="email" required="" /></div>
 	<div class="col"> </div>
 	<div class="clear"> </div>
 	</div>
 	 
 	<p style="text-align: center;">I want to subscribe to following blogs:</p>
 	 
 	 
 	<input type="checkbox" id="IT" value="IT">IT & Networking Blog<br>
 	<input type="checkbox" id="Process" value="Process">Process Improvement Blog<br>
 	<input type="checkbox" id="Management" value="Management">Business Management Blog<br>
 	<input type="checkbox" id="Education" value="Education">Education Training Blog<br>
 	 
 	 
 	<p style="text-align: center;">100% Privacy! We will never spam you.</p>
 	 
 	<div class="row center buttons" style="text-align: center;"><input class="button" name="Submit" type="submit" value="Subscribe Now" onclick="submit_form();" />
 	<div class="clear"> </div>
 	</div>
 	 
 	<input name="campaign_id" id="campaign_id" type="hidden" value="13f62ae3-f38d-fe80-a93a-57d40ufdsewb7d" /> 
 	<input name="assigned_user_id" id="assigned_user_id" type="hidden" value="1" /> 
 	<input name="moduleDir" id="moduleDir" type="hidden" value="Prospects" />
 	 
 	<!--my code starts here -->
 	<input name="list_name_c" id="list_name_c" type="hidden" value="bello" /></div>
 	 
 	 
 	</form>
 	 
 	 
 	<p>
 	<script type="text/javascript">// <![CDATA[
 	function submit_form()
 	{
 	 
 	if (typeof(validateCaptchaAndSubmit) != 'undefined')
 	{
 	validateCaptchaAndSubmit();
 	}
 	else
 	{
 	check_webtolead_fields();
 	//document.WebToLeadForm.submit();
 	check();
 	 
 	}
 	 
 	 
 	}
 	 
 	 
 	function check_webtolead_fields()
 	{
 	if (document.getElementById('bool_id') != null)
 	{
 	var reqs = document.getElementById('bool_id').value;
 	bools = reqs.substring(0, reqs.lastIndexOf(';'));
 	var bool_fields = new Array();
 	var bool_fields = bools.split(';');
 	nbr_fields = bool_fields.length;
 	for (var i = 0; i < nbr_fields; i++)
 	 
 	{
 	if (document.getElementById(bool_fields[i]).value == 'on')
 	{
 	document.getElementById(bool_fields[i]).value = 1;
 	}
 	else
 	{
 	document.getElementById(bool_fields[i]).value = 0;
 	}
 	}
 	}
 	 
 	}
 	 
 	 
 	function check()
 	{
 	 
 	var list_name = "";
 	var test = document.WebToLeadForm;
 	var txt = "";
 	var i;
 	 
 	for (i = 0; i < test.length; i++)
 	{
 	if (test[i].checked)
 	{
 	txt = txt + test[i].value + " ";
 	}
 	}
 	list_name = txt;
 	alert(list_name);
 	 
 	document.getElementById('list_name_c').value = list_name;
 	 
 	}	 
 	 
 	 
 // ]]></script>
 </p></body></html>

You can observe that in function check(), the following command is also capturing the hidden field:
document.getElementById('list_name_c').value = list_name;

The entrypoint of WebToPersonCapture actually calls for 'Capture.php', which practically invokes the file 'WebToPersonCapture.php'. The synthesized effect of these files is that all the form data is captured in respective tables of SugarCRM/SuiteCRM.

This is all what I can share with. Otherwise I am short of ideas now!

With thanks,

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

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

Hey there,

I am sry but this is becoming beyond our support, I can't go through all this code and figure out how does it function, as I told you use SugarCRM documentation and also try to find any answer from their support, that could be also helpful. You are on half way, link is sent with BF,and now you need part in SugarCRM to catch that.

Thank you for you understanding.

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!
#182610
Moderators: ForumSupporttomeperica
Time to create page: 0.071 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