• Steve415
  • NEWBIE
  • -1 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

I have a problem with the values of a picklist (with multiple values selection). I'm using the Web-To-Lead code to create the leads in SF but not in real-time, I 'm using a batch process where I load all leads from my website and run the SF applet to create the lead for each of them. So to pass the values to salesforce I'm using UploadValues. I'm creating the leads with no problem, everything is working ok but I have a field which is a picklist with multiple selection and this value is not going there in the correct format. How do I send multiple values? I'm using ";" to separate the values that I have but it doesn't work. It send the a string "value1;value2;..." but salesforce take this literally as it was one value and it even cuts the text to 40 characters (this is the limitation they explain in the documentation)

When I run the form directly I don't have problem passing these multiple values since the SF applet is reading directly from the <select> control

I hope you can help me with this.

Thanks,

Yesenia

Hi,

I am developping a contact form and I have to make a double post (in php), one on my website to save data in the database and another one on salesforce website.

For this task I am using Curl, it nearly works but I am getting problems for multiple select.

Here is my php code :

*****
$information_requested = $_POST["information_requested"];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.salesforce.com/servlet/servlet.WebToLead?encoding=ISO-8859-1" );
curl_setopt($ch, CURLOPT_POST, 1 );

$postContent .= "oid=00D300000000TGF&";
$postContent .= "00N30000000wTNa=$informationsRequested";
   
       
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postContent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);

curl_close($ch);
*****

Here is my html code :

*****
<input type="checkbox" name="information_requested[]" value="Product1">
<input type="checkbox" name="information_requested[]" value="Product2">
<input type="checkbox" name="information_requested[]" value="Product3">
*****

In my form, informations requested are an array of checkbox.
But salesforces need a <select multiple="multiple"><option value="product1"></option></select>. I don't know if this is the problem, but maybe I don't *construct* the query in the right way.

Do you have an idea ?

Thanks a lot fro your help.

Thierry Bucco