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?

Dear Tomeperica,

You are a good man. Thanks for your helping hand and guidance!

I have found the solution. Actually we were not able to submit the form, as the following command was not working:
document.myresubmit.submit();

After some googling & some trials, the following command worked:
document.getElementById("Yourformid").submit();

Here is the complete code for SOLUTION:
//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-57dgf43ersb7d" />
<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="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

IMPORTANT: User only need to replace the values of campaign, assigned user to make the above code work for them. I have assumed that the SuiteCRM has been installed in folder /suitecrm/ at the root of website.

Tome, I think that this instruction could also be added as a footnote to URL: crosstec.org/en/support/online-documenta...o-different-url.html

Some users may get benefited if they struggle to submit this form via the code mentioned therein.

Note: The solution has worked well for my implementation of SuiteCRM 7.7.6 (latest).

With thanks,

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

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

Hey there,

nice to hear that you have found a solution, we will pass this to our developers. ;)

Let us know if you need further help.

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!
#182692
  • 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 wish to capture or pass the value of record ID to SuiteCRM. But the following snippet is not working:
<input type="hidden" name="breezing_form_rec_id_c" value="'.htmlentities( ff_getSubmit('id') ).'"/>

Also the following snippet is only capturing the first selection of radio buttons, not multiple values:
<input type="hidden" name="off_days_c" value="'.htmlentities( ff_getSubmit('nonworkingdays') ).'"/>



You can visit the form at URL: <URL removed>

Please help.

With thanks,

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

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

Hey there,

regarding the Record ID, you will need to set this code into your Form Pieces -> Before Form -> Custom:
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Libraries
$db = JFactory::getDBO(); //Include Database Object

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

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

//Assign value to form element
ff_setValue('dataID', $result);

Make sure you have created hidden field in your form called dataID

Rest you will know, just add this code below to the rest of your code in End Submit Pieces:
<input type="hidden" name="dataID" value="'.htmlentities( ff_getSubmit('dataID') ).'"/>

Also instead #__facileforms_records put your db table like wu1zo_facileforms_records

Regarding checkbox multiple chooices passing, well curently thats a bit tricky and it will require some time for us to search for best solution.

I also 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!
#182963
  • 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 have tried to follow your instructions. I used the following code into Form Pieces -> Before Form -> Custom:
//Code for capturing Breezing Form Record ID starts here
$this->execPieceByName('ff_InitLib'); //Include BreezingForms Libraries
$db = JFactory::getDBO(); //Include Database Object

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

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

//Assign value to form element
ff_setValue('breezing_form_rec_id_c', $result);
echo $result;
//Code for capturing Breezing Form Record ID ends here

$result is being successfully echoed.

I used the following snippet in submit pieces:
<input type="hidden" name="breezing_form_rec_id_c" value="'.htmlentities( ff_getSubmit('breezing_form_rec_id_c') ).'"/>

But nothing is being passed to this filed in CRM.

Kindly guide.

With thanks,

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

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

Hey there,

did you add my code to this?
//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-57d4090f4b7d" />
<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="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

Well it must work, its just a new filed that should be passsed like the one you did above, pls double check all.

Also regarding the code for pulling oput the RecordID just add this instead of previous:
$result = intval($db->loadResult()) + 1;
Now it will display actual record that will be submited.

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