Implement Multi-value aka Picklist (Multi-Select) in the application logic.

Comments

chriscalip’s picture

Status: Active » Closed (fixed)
chriscalip’s picture

Status: Closed (fixed) » Fixed
2dareis2do’s picture

Tested this and it works a treat. Thankyou.

leoli’s picture

Status: Fixed » Needs review

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've tried, but not work.

leoli’s picture

works, safe_key|Some readable option must be the same for my case.
need to specific salesforce id as the salesforce key.

Thanks.

chriscalip’s picture

Leoli

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

chriscalip’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ashrafabed’s picture

Assigned: chriscalip » Unassigned

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