Hi,

i would like to use Multiselect in Country fields. Currently the is no way to do it. I think a better approach to integrate with more modules is an unified API. Here is a patch and an example implementation in countries module. What do you think?

Comments

webflo’s picture

see Countries project page for more information.

debo7debo’s picture

How do I apply the patch.

webflo’s picture

git apply -v example.path

see Patch workflows

alan d.’s picture

Any interest in this? Without testing the default value parts, the widget itself integrates perfectly with the countries module, so it is likely that other modules that use hook_options_list() would benefit greatly from this too.

http://drupalcontrib.org/api/drupal/drupal!modules!field!modules!options...

This tracks 32 uses, although drupalcontrib.org only tracks a tiny fraction of modules from do, so the likely list is probably more.

johnv’s picture

Status: Needs review » Needs work

This patch works fine but with remarks:
- the multiselect part has some 'trailing whitespace'
- the countries part is outdated - I applied it to countries.fields.inc vs. countries.module.

The default values are filled nicely. (if that is what you mean: when creating a node, the field is filled with the default values as per Note type settings)

I found 1 problem when submitting a page with an error, but that is caused by #1101264: Widget broken when form validations fails

carajito’s picture

Error:
multiselect-api-d7.patch

error: patch failed: multiselect.module:170
error: multiselect.module: patch does not apply

mparker17’s picture

Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)

multiselect-7.x-1.x is no longer supported, because Drupal 7 is no longer supported.

Is this still a desired feature for multiselect-2.0.0-beta4?

I'm going to mark this issue as "Postponed (maintainer needs more info)"... but when you answer, please change it back to "Active". If there is no reply in ~6 months, then I will mark this issue as "Closed (outdated)". Thank you in advance for your understanding and patience as I try to keep this module's issue queue clear.