Forums

Posting form to external CRM

jdaksiewicz 26 Apr, 2012
Hello all,
I am trying to use ChronoForms to post to an external CRM, but also utilize the email and redirect functionality of ChronoForms (it is not essential to update the internal ChronoForms database)

I have gotten the form to work by removing the automatically generated form tags and adding them when in a custom code setting so that the form post action pointed to <form action="http://members.jesubi.com/Jesubi/webtolead" method="post"> (as opposed to the chronoform action) This updated the CRM but removed the email and redirect options.

Is there a way to post the form to "http://members.jesubi.com/Jesubi/webtolead" but stay within the Chronoform component?

Thanks!
jdaksiewicz 26 Apr, 2012
BTW, if it makes a difference - I am using Chronoforms 4.0 RC3.21
GreyHead 26 Apr, 2012
Hi jdaksiewicz,

Please upgrade to CFv4 RC3.3 as there are some bug-fixes.

If you set the form Submit URL then the form is submitted directly to that URL, ChronoForms never sees the form results and can do nothing with them.

If you want to send just the data to the CRM (which you probably do) then use the cURL action; if you want to sent the user and the data to the CRM use the Redirect URL and Redirect User actions.

Bob
jdaksiewicz 27 Apr, 2012
Thanks for the quick response Bob,
I had actually written some cURL code and tried inserting it a few ways but with no luck.

I had no idea there was a cURL action available. I think I am close but still haven't been able to update the other db.

Currently the form is still using the automated form tags and the default post action associated with the form. For the "On Submit" actions I have created, in order: Email, Curl then finally Redirect User.
In the Curl action, I have the target URL set correctly, header in response set to No, and my params/fields map lines up with the form names:

firstName=firstName
lastName=lastName
company=company
title=title
email=email
phone=phone
questions=questions

I do have a couple "hidden" input types in the form, would those need to be included in the Curl field parameters to correctly update the db?

Any help is greatly appreciated.
My test form is here:
http://leadjen.com/index.php?option=com_chronoforms&chronoform=ContactUs-Test124

Thanks
GreyHead 27 Apr, 2012
Hi jdaksiewicz,

You haven't said which CRM you are using but usually there's some kind of login or identification info required. Is that the 'token' hidden input? You should include those in the Params/fields box in the same way.

Adding a Debugger action and/or turning on CURL debug may help you see what is happening (though you may get whole web pages included in the debug output).

Bob
jdaksiewicz 09 May, 2012
Thanks again Bob,
I am trying to submit to the Jesubi CRM.
I am wondering if maybe the Redirect action happens
too quickly, before the data has time to submit?
I was also wondering about the difference between the core action: redirect user
and the Curl: redirect url actions? I have been using the core action to redirect.

I added the debugger but couldn't really tell what was wrong or not.
I got this:
Data Array:

Array
(
    [option] => com_chronoforms
    [chronoform] => ContactUs-Test124
    [event] => submit
    [Itemid] => 
    [token] => 6dd24065-e002-4aa4-ac21-2bcc213b161a
    [customerId] => 18
    [customField35] => 
    [firstName] => JeromeTest124
    [lastName] => JeromeTest124
    [company] => JeromeTest124
    [title] => 
    [email] => Test@test.com
    [phone] => 
    [0854ddf6bc9e6a1676d03fb0685ba374] => 1
    [curl] => 


I also got 1. email info and the 2.curl info:
    CURL OK : the CURL function was found on this server.
    $curl_values: token=6dd24065-e002-4aa4-ac21-2bcc213b161a&customerId=18&customField35=&firstName=JeromeTest124&lastName=JeromeTest124&company=JeromeTest124&title=&email=Test%40test.com&phone=&questions=
    curl_target_url: http://members.jesubi.com/Jesubi/webtolead


Thanks
jdaksiewicz 20 May, 2012
Any other thoughts on why this might not be populating the 3rd party CRM?
I saw another post of Greyhead's about using curly brackets around some of the
fields/params?
GreyHead 21 May, 2012
Hi jdaksiewicz,

Hard to tell from what is here. I'd expect to see some response back from the jesubi site in the debugger info - though sometimes you get a whole web page.

You can see the parameters here: token=6dd24065-e002-4aa4-ac21-2bcc213b161a&customerId=18&customField35=&firstName=JeromeTest124&lastName=JeromeTest124&company=JeromeTest124&title=&email=Test%40test.com&phone=&questions=

The main difference between cURL and ReDirect is that cURL just sends the data; and ReDirect sends the data AND the user to the other site.

Bob
yorb 27 Aug, 2012
Really sorry to resurrect this thread, but I have a situation where I want to send the form data AND THE USER to another page (which will process it) but ironically none of the 'redirect/remote submit' actions seem to be what I want. They all seem to either send just the user, or just the data.

I know you said ReDirect will send both GH, but I can't seem to make it do that. Do you have to do something special to get that behavior?

Really what I need is multipage behavior I guess, but I can't use Show Form because it doesn't actually show the page (menu item) it just shows the form itself. Any ideas?

Thanks.
GreyHead 27 Aug, 2012
Hi yorb,

The ReDirect URL action will allow you to build a URL including data from the form; the ReDirect User action will redirect the user to that URL.

Bob
yorb 28 Aug, 2012
Indeed, that is useful functionality and I have used that method elsewhere, however in this instance I need to POST the data. Basically, to submit the form to another URL instead of itself. In CFv3 I had switched the action URL on the form object when I clicked an alternate button, but I figured it would be cleaner to switch in the CFv4 On Submit event...just can't figure out how. I know there's a "submit URL" but I think that overrides all OnSubmit actions, meaning I couldn't do the switch.

I feel like I'm overlooking something simple...
GreyHead 28 Aug, 2012
Hi Yorb,

Please see this FAQ which lists ways of passing data and links to a help doc you can buy if you need the code.

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