HTTP Post Question

stevepeck 18 Mar, 2013
Hi -

We have a third party lead tracking system and we were using "Submit URL" to post the lead data to the third party system. I am now implementing captcha's for the forms using on submit however when you use the "Submit URL" it will disable all the form "on submit" event functions which control the captcha. Are their any options to add a On submit action that will post to a URL? Thanks.
GreyHead 18 Mar, 2013
Hi Steve,

If you change the Submit URL ChronoForms never sees the results and so can't process them (and that includes checking the Captcha).

There's an HTTP Request action in the Redirect/Remote Submit action group that would send the results (including the spam ones) to a remote URL when the form is submitted.

Or you could use either the cURL or the ReDirect URL + ReDirect User actions to send the data after submission.

Bob
stevepeck 18 Mar, 2013
When using the ReDirect URL I get a Warning: array_merge() [function.array-merge]: Argument #2 is not an array
GreyHead 18 Mar, 2013
Hi Steve,

The quick and dirty answer is to set Error Reporting to System Default or None in the site Global Configuration. That should hide PHP Warnings (which are just warnings not errors).

Bob
stevepeck 18 Mar, 2013
I could not get it to work in that nature so I went to Utilities added a HTTP Request under the On Submit Action and it seems that no matter what URL I post to the HTTP Request URL the data does not get sent to that URL. The E-Mail event works but I can not seem to get the form to post the HTTP Request.
stevepeck 19 Mar, 2013
Just a update I was working on this yesterday and did not get this working. I currently have the form set up with:

On Load
HTTP Request - Trying to send the submit data to the 3rd party URL that accepts HTTP Post
Load Captcha
Show html

On Submit
HTTP Request (I tried the HTTP Request here as well and the data is not being sent)
Check Captcha
-OnSuccess
-OnFail
Email - Email to Admin (The emails go through fine)

I am not sure what I am missing here. Thanks, Steve
GreyHead 20 Mar, 2013
Hi Steve,

I've never used the HTTP Request action myself but from reading Max's Help and tips it looks as though it it designed to be executed using a JavaScript event in the browser and not in the On Submit event.

The cURL action is probably the best option from the On Submit event.

Bob
stevepeck 20 Mar, 2013
Thanks for the Reply I am new to ChronoForms. When I try the Curl option with the URL to submit the data to the submit takes about 1 minute before it returns anything. When it does return it returns a Fatal error: Uncaught DatabaseHelper::query failed. I added the Curl action to the onSubmit and added the URL I want the data to be pushed to. This same URL works when I add it to the Submit URL section under the general options. Any ideas?
GreyHead 21 Mar, 2013
Hi Steve,

You have to build a cURL URL using the options in the action. What is the URL you want to send?

Bob
stevepeck 21 Mar, 2013
Ill send you a PM with the URL. Thanks.
This topic is locked and no more replies can be posted.