Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Key-value pairs MUST be specified as "safe_key|Some readable option". Use of only alphanumeric characters and underscores is recommended in keys. One option per line. Option groups may be specified with . <> can be used to insert items at the root of the menu after specifying a group.
0|All
1|Asia
2|North America
3|Europe
4|Latin America
5|Rest of world
Regions of Interest:<select id="00N20000002M5fo" multiple="multiple" name="00N20000002M5fo" title="Regions of Interest"><option value="All">All</option>
<option value="Asia">Asia</option>
<option value="North America">North America</option>
<option value="Europe">Europe</option>
<option value="Latin America">Latin America</option>
<option value="Rest of world">Rest of world</option>
</select><br>
I'll lay it out very plainly with an example just because it took me some time to figure this out:
My Drupal form with a checklist named I am interested in generated html similar to the following:
----------------------
<div class="form-item webform-component webform-component-checkboxes" id="webform-component-i-am-interested-in">
<label for="edit-submitted-i-am-interested-in">I am interested in </label>
<div id="edit-submitted-i-am-interested-in" class="form-checkboxes"><div class="form-item form-type-checkbox form-item-submitted-i-am-interested-in-Scheduling-a-demo">
<input type="checkbox" id="edit-submitted-i-am-interested-in-1" name="submitted[i_am_interested_in][Scheduling a demo]" value="Scheduling a demo" class="form-checkbox"> <label class="option" for="edit-submitted-i-am-interested-in-1">Scheduling a demo </label>
</div>
<div class="form-item form-type-checkbox form-item-submitted-i-am-interested-in-2">
<input type="checkbox" id="edit-submitted-i-am-interested-in-2" name="submitted[i_am_interested_in][2]" value="2" class="form-checkbox"> <label class="option" for="edit-submitted-i-am-interested-in-2">Joining the community </label>
........
From one of the checkbox items, you take 'i_am_interested_in' as the key: ( submitted[this_part] )
----------------------
In salesforce, when you generate the web-to-lead form with the picklist, you'll get something like: Label:<select id="00N400000002SLqJ"......
That 'id' is what you use for the 'value'.
----------------------
So, in this example, configuration of a multi-select list / picklist / checklist on the Drupal Salesforce Webform config page uses:
key: i_am_interested_in (retrieved as above)
value: 00N400000002SLqJ
The form will then send the 'key' to your form's submitted items to salesforce
Comments
Comment #1
chriscalip commentedComment #2
chriscalip commentedComment #3
2dareis2do commentedTested this and it works a treat. Thankyou.
Comment #4
leoli commentedKey-value pairs MUST be specified as "safe_key|Some readable option". Use of only alphanumeric characters and underscores is recommended in keys. One option per line. Option groups may be specified with . <> can be used to insert items at the root of the menu after specifying a group.
0|All
1|Asia
2|North America
3|Europe
4|Latin America
5|Rest of world
I've tried, but not work.
Comment #5
leoli commentedworks, safe_key|Some readable option must be the same for my case.
need to specific salesforce id as the salesforce key.
Thanks.
Comment #6
chriscalip commentedLeoli
Most definitely, what can we do to help our peers avoid that mine? I had it on the README.txt not sure if its enough.
kind regards,
Chris Calip
Comment #7
chriscalip commentedComment #9
ashrafabedI'll lay it out very plainly with an example just because it took me some time to figure this out:
My Drupal form with a checklist named I am interested in generated html similar to the following:
----------------------
From one of the checkbox items, you take 'i_am_interested_in' as the key: ( submitted[this_part] )
----------------------
In salesforce, when you generate the web-to-lead form with the picklist, you'll get something like:
Label:<select id="00N400000002SLqJ"......That 'id' is what you use for the 'value'.
----------------------
So, in this example, configuration of a multi-select list / picklist / checklist on the Drupal Salesforce Webform config page uses:
key: i_am_interested_in (retrieved as above)
value: 00N400000002SLqJ
The form will then send the 'key' to your form's submitted items to salesforce