TOPIC:

Has anyone succeeded in intergrat'g BF & SugarCRM? 3 years 10 months ago #182659

  • Topic Author
  • Rajneesh
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 75
  • Thanks: 0
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

Please Log in or Create an account to join the conversation.

Last edit: Post by Rajneesh. Reason: mention of live website is removed.

Has anyone succeeded in intergrat'g BF & SugarCRM? 3 years 10 months ago #182692

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 667
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!

Please Log in or Create an account to join the conversation.

Has anyone succeeded in intergrat'g BF & SugarCRM? 3 years 10 months ago #182902

  • Topic Author
  • Rajneesh
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 75
  • Thanks: 0
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
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by Rajneesh. Reason: mention of live website is removed.

Has anyone succeeded in intergrat'g BF & SugarCRM? 3 years 10 months ago #182963

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 667
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!

Please Log in or Create an account to join the conversation.

Last edit: Post by tomeperica.

Has anyone succeeded in intergrat'g BF & SugarCRM? 3 years 10 months ago #183005

  • Topic Author
  • Rajneesh
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 75
  • Thanks: 0
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

Please Log in or Create an account to join the conversation.

Has anyone succeeded in intergrat'g BF & SugarCRM? 3 years 10 months ago #183039

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 667
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!

Please Log in or Create an account to join the conversation.

Last edit: Post by tomeperica.
Moderators: ForumSupport
Time to create page: 0.136 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!