function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lhobartlhobart 

Changing picklist to checkboxes on web-to-lead form

Hello -
 I'm creating a web-to-lead form that asks the user if they want to receive email updates on webinars, live events, and software. This field is called "Marketing Updates" in Salesforce, and is a picklist. When I generate the code for the web-to-lead form, Salesforce gives me code for a picklist where the user can use the control key to select multiple options. However, I want to make it a little more user-friendly, and have the user select from checkboxes instead of a picklist. I know the code for checkboxes, but I can't get the data to pass through to Salesforce when I used them instead of the picklist code generated by Salesforce.
 
My code looks like this right now:
 
<td>Yes, please send me email updates on the following:
    <select  id="00X0000000XXXXX" multiple="multiple" name="00X0000000XXXXX" title="Mktg Updates:">
<option value="All">All updates</option>
<option value="Webinars">Webinars</option>
<option value="Live Events">Live Events</option>
<option value="Software">Software</option>
</select><br>
Ron HessRon Hess
your code is a picklist, if i understand you want to build a checkbox list

i think you will have to write javascript and put this in an onsubmit() function on the form, then you can combine the checkboxes into the multipick list value that salesforce expects, something like

opt1;opt4;opt12
diegartediegarte

Hello-


I think I have an interesting alternative solution for your specific situation.

Instead of using the default web-to-lead function of Salesforce (i.e.creates an html webform via Salesforce and then try to integrate it into your website) which seams to be constraining at some points, what would you say of thinking the whole process in just the opposite way.

FormVester is a free application (available on the AppExchange directory) that lets you generate leads into Salesforce.com from any of your existing online forms.

No matter how complex your webforms are, FormVester will recognise any forms, and capture all the information filled in by a visitor and generate it as a new lead into Salesforce.

No need then to integrate the webform code generated by salesforce into your website, just use your own existing ones without any restriction.

The installation is extremely easy, and you will enjoy great flexibility and features that will surely leverage your web-to-lead efforts!

I hope my advice would benefit everyone willing to simplify their web-to-lead at no cost.

dxfilo@mac.comdxfilo@mac.com

I am having a similar problem but in reverse.  I would like to convert several Checkbox options on a webform and group them into a picklist, then have the selected value mapped to the corresponding checkbox in salesforce.com.  Is this possible? Any help will be greatly appreciated.

Eston WinnEston Winn
In case anyone is still having issues with this, I was able to achieve the desired solution by altering the HTML to use input type as "checkbox" and give the name for each input the name of your picklist field... Using your code above:

<td>Yes, please send me email updates on the following:
    <select  id="00X0000000XXXXX" multiple="multiple" name="00X0000000XXXXX" title="Mktg Updates:">
<option value="All">All updates</option>
<option value="Webinars">Webinars</option>
<option value="Live Events">Live Events</option>
<option value="Software">Software</option>
</select><br>

Change to:
Yes, please send me email updates on the following:<br />
<input type="checkbox" id="00X0000000XXXXX" name="00X0000000XXXXX" title="Mktg Updates" value="All">All<br />
<input type="checkbox" id="00X0000000XXXXX" name="00X0000000XXXXX" title="Mktg Updates" value="Webinars">Webinars<br />
<input type="checkbox" id="00X0000000XXXXX" name="00X0000000XXXXX" title="Mktg Updates" value="Live Events">Live Events<br />
<input type="checkbox" id="00X0000000XXXXX" name="00X0000000XXXXX" title="Mktg Updates" value="Software">Software<br />

Now, when you submit the W2L form the picklist will reflect any box that was checked on the form. 

I know this post is old but wanted to share the solution that worked for me.