Posted by webflo on April 1, 2011 at 12:45pm
5 followers
Jump to:
| Project: | Multiselect |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
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?
| Attachment | Size |
|---|---|
| multiselect-api-d7.patch | 5.48 KB |
| multiselect-api--countries-integration-d7.patch | 1.28 KB |
Comments
#1
see Countries project page for more information.
#2
How do I apply the patch.
#3
git apply -v example.pathsee Patch workflows
#4
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!options.api.php/function/implementations/hook_options_list/7
This tracks 32 uses, although drupalcontrib.org only tracks a tiny fraction of modules from do, so the likely list is probably more.
#5
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
#6
Error:
multiselect-api-d7.patch
error: patch failed: multiselect.module:170
error: multiselect.module: patch does not apply