Hi,
I have made several forms designed to simply collect data from fields and send it in an email. The forms are all working properly, however I need to integrate them with SalesForce. Basically all that means is that I need to add a couple hidden fields which is no problem, but more importantly I need to add the form action tag: action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
If I add it into the form action area in the chrono forms admin, the forms no longer send email. Is there any way I can add this form action tag, and still be able to collect the data from the fields and send it in an email, without having to do any additional php code from scratch? I am not good with PHP at all.
Any help would be greatly appreciated!
I have made several forms designed to simply collect data from fields and send it in an email. The forms are all working properly, however I need to integrate them with SalesForce. Basically all that means is that I need to add a couple hidden fields which is no problem, but more importantly I need to add the form action tag: action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
If I add it into the form action area in the chrono forms admin, the forms no longer send email. Is there any way I can add this form action tag, and still be able to collect the data from the fields and send it in an email, without having to do any additional php code from scratch? I am not good with PHP at all.
Any help would be greatly appreciated!
Hi lewmaster,
This should work OK if you put the url: https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8
in the 'Submit URL' box on the Form URLs tab.
Bob
This should work OK if you put the url: https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8
in the 'Submit URL' box on the Form URLs tab.
Bob
Hi Lewmaster,
If Bob's solution didn't work then there is no way but to try this method, this is just a piece of code from another component which uses the fsockopen, you will need to edit this code to get it working :
If Bob's solution didn't work then there is no way but to try this method, this is just a piece of code from another component which uses the fsockopen, you will need to edit this code to get it working :
function SEND_CONFIG_CARD($values, $host, $script) {
$req = parse_post_message($values);
$header .= "POST /$script HTTP/1.0\r\n";
$header .= "Host: $host\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen($host, 80, $errno, $errstr, 30);
if ( !$fp ) {
echo "$errstr ($errno)<br />\n";
} else {
fputs ($fp, $header . $req);
$ct = "";
while (!feof($fp)) {
$ct .= fgets($fp, 1024);
//echo $ct."<br>";
}
$rs = parse_result($ct);
fclose($fp);
}
return $rs;
}
function parse_post_message($values){
$req = "";
foreach ($values as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=".($value);
}
return $req;
}
Ok,
I tried putting the URL in the "Submit URL" field. I think it works, but the only problem is the Emails don't send anymore.
What do I need to do with the code you pasted to make it work, and where do I need to add it?
Thanks,
Sam
I tried putting the URL in the "Submit URL" field. I think it works, but the only problem is the Emails don't send anymore.
What do I need to do with the code you pasted to make it work, and where do I need to add it?
Thanks,
Sam
Hi Sam,
this code should be put at the on submit code with some changes!!
Cheers
Max
this code should be put at the on submit code with some changes!!
Cheers
Max
This topic is locked and no more replies can be posted.