Sunday, September 11, 2016

Display Multi-Select Picklist field as CheckBox field on Web-to-Lead

Sometime we use multi-select picklist fields on lead object to capture more than once choice submitted by our customers/prospects in response to certain questions.

A sample business scenario could be, if we ask our customers/prospects to respond which all our services they are interested in.

In salesforce if we use a Picklist (Multi-Select) field, that solves our purpose.


Now if we want the same information to be captured from a web page through the web-to-lead integration, we can simply generate the salesforce code for the multi-select picklist field.

However if we see the web form output for the multi-select picklist field, it doesn’t look so great and while filling the web form end user has to press the Ctrl key in order to select more than one choice.


How about if on the web form we provide a user-friendly interface by replacing the multi-select picklist field with multiple check boxes? Sounds interesting! Isn’t it?


Okay, so if we want to achieve the above output on our web form, we need 3 additional check box fields in salesforce lead object in order to do the mapping with web-to-lead integration.

But NO, we are not going to create 3 fields, where we just needed one field in salesforce lead object.

Here is how we can map the salesforce multi-select picklist field with multiple checkboxes on the web form.

Replace your salesforce generated web-to-lead code for multi-select picklist field with below code.

Please specify your Interest Areas:

Salesforce Customization: <input  id="00NG000000ETZDd" name="00NG000000ETZDd" type="checkbox" value="Salesforce Customization" /><br>

Salesforce Development: <input  id="00NG000000ETZDd" name="00NG000000ETZDd" type="checkbox" value="Salesforce Development" /><br>

Salesforce Adoption: <input  id="00NG000000ETZDd" name="00NG000000ETZDd" type="checkbox" value="Salesforce Adoption" /><br>

The ID "00NG000000ETZDd" represents the API ID of salesforce multi-select picklist field.

No comments:

Post a Comment