Instructions
- Insert this code in your PHP Scripts menu of your RSForm!Pro form.
|
//Capture RSForm!Pro fields. //If you need more fields just add 'NewField' in your form and add this line: $new_field=$_POST['form']['NewField']. $first_name=$_POST['form']['FirstName']; $last_name=$_POST['form']['LastName']; $webtolead_email1=$_POST['form']['Email']; $phone_mobile=$_POST['form']['MobilePhone']; $lead_source_description=$_POST['form']['Message']; $lead_source="Campaign"; $campaign_id="de83c5e1-955e-0c64-a0a0-4a48468cde53"; //Replace this value with your Campaign ID $assigned_user_id="6e2ae8ec-8634-c6d8-bb0b-49d99c1cb4e1"; //Replace this valu with the assigned User ID $redirect_url=""; $req_id="last_name;webtolead_email1;phone_mobile;";
//Prepare $PostFields array to send it to your SugarCRM installation with cURL method $PostFields= "first_name=".ucwords(strtolower($first_name)) ."&last_name=".ucwords(strtolower($last_name)) ."&webtolead_email1=".$webtolead_email1 ."&phone_mobile=".$phone_mobile ."&lead_source_description=".$lead_source_description ."&lead_source=".$lead_source ."&campaign_id=".$campaign_id ."&assigned_user_id=".$assigned_user_id ."&redirect_url=".$redirect_url ."&req_id=".$req_id;
//Send your data to your SugarCRM installation $Curl_Session = curl_init('http://www.audox.cl/crm/index.php?entryPoint=WebToLeadCapture'); //Use here your own url. curl_setopt($Curl_Session, CURLOPT_POST, 1); curl_setopt($Curl_Session, CURLOPT_POSTFIELDS, $PostFields); curl_setopt($Curl_Session, CURLOPT_RETURNTRANSFER, 1); $result=curl_exec($Curl_Session); curl_close ($Curl_Session);
|
- Replace yellow values with yours and add or edit the fields you need to save in SugarCRM.
If you want to integrate RSForm!Pro with Salesforce for use RSForm!Pro Salesforce plugin.
|