SugarCRM and Chronoforms v4

chuckers82 04 Apr, 2012
I am trying to submit a form using curl to SugarCRM with v4 and i am getting the following:

Data Array: 
Array
(
    [chronoform] => businessowner
    [event] => submit
    [Itemid] => 255
    [option] => com_content
    [view] => article
    [id] => 53
    [howlong] => 1-5 years
    [typeofbus] => test
    [howmuchmoney] => test
    [whatisitfor] => test
    [companyname] => charlie
    [website] => http://www.google.com
    [firstname] => test
    [lastname] => test
    [title] => test
    [Phone] => 5555555555
    [email] => 
charlie@xxxxx.com
    [input_submit_0] => Send Message
    [f80841185a438c013cf6dba3b1c203ba] => 1
    [curl] => We are sorry, the server is currently unavailable, please try again later.
)
Validation Errors: 
Array
(
)
Thank You for your interest in CommunityLeader.

Your message has been received and we will respond shortly.
Debug Data
curl
CURL OK : the CURL function was found on this server.
$curl_values: website=http://www.google.com
curl_target_url: https://xxxxx.sugarondemand.com/index.php?entryPoint=WebToLeadCapture
email
1
Result
An email has been SENT successfully from (admin) charlie@xxxx.com to charlie@xxxx.be, jbarisonzi@xxxxx.com
Body
How long have you been in business? 1-5 years
What type of business? test
How much money are you looking to raise? test
What is the money for? test
Business Contact Information

charlie Company Name
http://www.google.com Website
{name} Your Name
test Title
3202826636 Phone
charlie@xxxxx.com Email




Attachments
array ( )


as you can see it is not getting submitted to the sugarCRM instance...what am i doing wrong?
GreyHead 04 Apr, 2012
Hi chuckers82 ,

The whole query string part of the URL - from the ? on - should be in the Params/Fields box. So the Target URL is just https://xxxxx.sugarondemand.com/index.php

(or you can get my cURL [GH] action which I think will haw handle this for you).

Bob
chuckers82 05 Apr, 2012
Send me the curl [gh] to try out. Here is what i get after what you recommended above it seems to have submitted but :

Data Array: 
Array
(
    [chronoform] => businessowner
    [event] => submit
    [Itemid] => 255
    [option] => com_content
    [view] => article
    [id] => 53
    [howlong] => 6-10 years
    [typeofbus] => test
    [howmuchmoney] => test
    [whatisitfor] => test
    [companyname] => test
    [website] => http://www.remergraphics.com
    [firstname] => test
    [lastname] => test
    [title] => test
    [Phone] => 3202826636
    [email] => 
 charlie@remergraphics.com
    [input_submit_0] => Send Message
    [b6c165a8ec1086273ea4d960f782515f] => 1
    [curl] => HTTP/1.1 302 Found
Server: nginx
Date: Thu, 05 Apr 2012 20:45:42 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=f53ii6qpvisso4m8pfh293k2b0; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: index.php?action=Login&module=Users&login_module=Home&login_action=index
X-Application-Server: 10.13.19.133
Content-Length: 0


)
Validation Errors: 
Array
(
)
Debug Data
curl
CURL OK : the CURL function was found on this server.
$curl_values: website=http://www.remergraphics.com
curl_target_url: https://busyworkerbee.sugarondemand.com/
email
1
Result
An email has been SENT successfully from (admin) charlie@remergraphics.com to charlie@busyworker.be, jbarisonzi@communityleader.com
Body
How long have you been in business? 6-10 years
What type of business? test
How much money are you looking to raise? test
What is the money for? test
Business Contact Information

test Company Name
http://www.remergraphics.com Website
test test
test Title
3202826636 Phone
charlie@remergraphics.com Email



Submitted by 173.18.236.250
Attachments
array ( )

here are my params

entryPoint=WebToLeadCapture
howlong=in_business_c
typeofbus=business_type_c
howmuchmoney=money_to_raise_c
whatisitfor=money_use_c
companyname=account_name
website=website
phone=phone_work
email=webtolead_email1
firstname=first_name
lastname=last_name
campaign_id=103ea1ff-66c3-6b54-7a50-4f77e9ddc13d
assigned_user_id=85b83b86-92c1-2d37-1ff0-4da2550d3d91
team_id=75ef0f4d-b9f4-490d-a46b-4f77ec44b2ff
team_set_id=Community Leader


can you see anything that i am doing wrong??
chuckers82 05 Apr, 2012
SUCCESS!!!
Here is what i did
1. Create a custom code box put the following:
<?php
$form->data['entryPoint'] = "WebToLeadCapture";
$form->data['ANY STATIC DATA'] = "YOUR STATIC DATA";
$form->data['campaign_id'] = "YOUR CAMPAIGN ID";
$form->data['assigned_user_id'] = "YOUR ASSIGNED USER ID";
$form->data['team_id'] = "YOUR TEAM ID";
$form->data['team_set_id'] = "YOUR TEAM SET ID";
?>

2. in the curl box enter

SUGAR CRM FIELD NAME=YOUR FORM FIELD NAME
ANY STATIC DATA=ANY STATIC DATA
entryPoint=entryPoint
campaign_id=campaign_id
assigned_user_id=assigned_user_id
team_id=team_id
team_set_id=team_set_id

make sure your target url is like this: "https://xxxxx.xxxxxx.com/" with out anything following, no '?' etc...
GreyHead 06 Apr, 2012
Hi Chuck,

Well done.

Bob

PS the cURL [GH] action is here It avoids the nedd for the extra Custom Code action you have here and will also handle a query string in the Target URL.
This topic is locked and no more replies can be posted.