bobbingwide / oik-fields

Field formatting for custom post type (CPT) meta data, plus [bw_field], [bw_fields], [bw_new] and [bw_related] shortcodes
https://www.oik-plugins.com/oik-plugins/oik-fields-custom-post-type-field-apis/
1 stars 0 forks source link

Show all the selected values for a multiple select field #1

Closed bobbingwide closed 8 years ago

bobbingwide commented 8 years ago

The select field type supports single or multiple select. Currently when displaying a multiple select field using the [bw_field(s)] shortcode the display is incorrect. It's only displaying the first value from the array.

It needs to cater for the fact that the value passed is actually an array and each value needs to be converted to the display version.

The fields should be displayed as comma separated values, similar to the display for taxonomies.

Proposed solution

Change bw_return_field_select() to check for $args #multiple and process accordingly.

Also update the documentation. For the current documentation on the select field see

http://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/free-oik-plugins/oik-fields-custom-fields-plugin/oik-fields-field-types/select-field-type/