Submit to SugarCRM-email verifications-redirect

geocentricdesign 20 Apr, 2010
Here's what I'm going for:

A contact info form in Joomla/Chronoforms that submits to SugarCRM (using code generated from Sugar's web-to-lead form builder), sends email verifications to an administrator and the person filling out the form, then redirects back to a Joomla page. SugarCRM is on the same site/server: Joomla site is .../joomla and sugar site is .../leads. I've tried every imaginable configuration with & without several plugins and cannot for the life of me get this simple process to work. As a matter of fact I haven't been able to get a form to do anything above a single operation whether it uses plugins or not. For example I can get the form to submit to SugarCRM by only putting in the URL in the submit to field, but the email doesn't work (and I have definitely set it up correctly). From there I've tried the Redirect plugin, CURL, and every combination I could fathom. Do you need to do a bunch of manual coding to get this to work or something? I've followed the tutorials on here as best I could (there are a lot of variables with the interface as confusing as it is). Maybe I'm missing something? I wish there was some good CLEAR documentation of this plugin. I'm sure with the right direction it is extremely useful.

This is my final cry for help. Can I get Greyhead or someone knowledgeable to log in with creds and check it out?
GreyHead 21 Apr, 2010
Hi geocentricdesign,

By all means email or PM me the URL and a SuperAdmin login and I'll take a look. I really don't want to have to install SugarCRM to test this here.

The SubmitURL will not work as it submits the form to the URL, ChronoForms never sees it and so cannot send emails or do anything else.

The cURL Plugin is the most appropriate plugin here and should work OK unless there are some quirks in the way SugarCRM needs the data configured..

Bob
GreyHead 24 Apr, 2010
Hi geocentricdesign,

I think this is working OK now. Please check your SugarCRM records to make sure.

[attachment=1]24-04-2010 10-31-47.png[/attachment]

Here's what I found - any one of these would have broken the cURL.
[list]
  • There was a typo in one of the input field values - just a single stray ' (see below)
  • The Target URL entry had part of the query string included http://example.com/index.php?entryPoint=WebToLeadCapture. Only the blue part goes in the Target URL, the red part goes into the Extra Fields Data box on the General tab (without the ?)
  • The plugin wasn't enabled on the Form Editor Plugins tab (green bars are enabled)
  • In the Form setup you had an entry in the OnSubmit URL box. This means that the form data is submitted directly to that URL, ChronoForms never sees it and so the cURL plugin, email etc. will not be executed
  • [/list]

    There was also a redirect_url being set in the cURL data from a hidden field in the form. The effect of this was indeed that the form redirected after the cURL but it skipped past the DeBug page. I removed this from the cURL config and the Form HTML and put it into the ChronoForms ReDirect URL box instead so that DeBug displays.

    That's it. I've left Debug turned on in both the Plugin config and the Form General tab so that you can see the results. Turn them off when you go live.

    Bob
    marcielo 03 Aug, 2010
    Hi Greyhead

    I tried your approach, when I use the module for the form I get the CURL debug info saying:
    CURL response: We are sorry, the server is currently unavailable, please try again later.

    the rest of the debug:
       1. Form passed first SPAM check OK
       2. Form passed the submissions limit (if enabled) OK
       3. Form passed the Image verification (if enabled) OK
       4. Form passed the server side validation (if enabled) OK
       5. $_POST Array: Array ( [fornavn] => test [efternavn] => test [mail] => contact@me.dk [button_3] => Submit [ea4d57295c6d3aec5b31f88a8e8b854d] => 1 [1cf1] => 47ed75ca94ed24e0843df538742c0655 [chronoformname] => sugar2 )
       6. $_FILES Array: Array ( )
       7. CURL transaction executed
       8. Form passed the plugins step (if enabled) OK
       9. An email has been SENT successfully from (test)contact@mail.dk to contact@me.dk
      10. Debug End


    When I use a menu link for the form I get redirected to the target link = Sugarcrm login page, instead of the form.

    Did I miss something that isn't pointed out in thread above?
    GreyHead 03 Aug, 2010
    Hi marcielo ,

    We are sorry, the server is currently unavailable, please try again later.


    Silly question, but could that be the problem?

    Bob
    marcielo 04 Aug, 2010
    You made me think and I found the answer 😀

    I googled for:

    We are sorry, the server is currently unavailable, please try again later.



    and found an old thread mentioning this issue. It´s caused when the form has the wrong campaign id or in my case missing!

    In another thread here in the forum I found that the campaign id is inserted in the CURL editor --> general tab --> and in the 'Extra fields Data' box

    I use SugarCRM CE 5.5.4
    GreyHead 04 Aug, 2010
    Hi marcielo,

    Yes - fixed data goes in that box in the form key=value (or id=999) with each entry on a separate line.

    Bob
    This topic is locked and no more replies can be posted.