mustardBees / cmb-field-select2

Select2 field type for Custom Metaboxes and Fields for WordPress
93 stars 46 forks source link

support for multiple=true pw_multiselect fields? #15

Closed natebeaty closed 8 years ago

natebeaty commented 9 years ago

This change should be making its way to master soon in CMB2: https://github.com/WebDevStudios/CMB2/pull/262 to allow saving multiple metadata entries.

Right now pw_multiselect seems pretty tied to the single metadata entry setup. Would be great if it was adaptable to also work with CMB2 fields that have 'multiple' => true in their options.

This is the error currently coughed up when you set 'multiple' => true on a field:

Notice: Array to string conversion in /Users/nate/Sites/ihc/web/app/mu-plugins/cmb-field-select2/cmb-field-select2.php on line 73

mustardBees commented 8 years ago

Hi @natebeaty. This should now work. I've released a new version. There is a limitations section in the documentation which details one use case which I am currently unable to resolve. Put simply, the field does not work well as a repeatable field within a repeatable group.