ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

form integration with salesforce

lewmaster 16 Oct, 2007
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!
Max_admin 16 Oct, 2007
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 :
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;
}
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
lewmaster 17 Oct, 2007
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
Max_admin 17 Oct, 2007
Hi Sam,

this code should be put at the on submit code with some changes!!

Cheers

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
lewmaster 18 Oct, 2007
Can you possibly specify what parts of the code I need to change? Also, would it go in the submit code before or after the email is sent?

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

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com