Closed forkbombe closed 7 years ago
It appears that the docs are wrong on this. Try this instead:
'meta' => array( 'multiple' => true ),
Works for me :-)
Hi @christianwach @bambattajb - thanks for raising this issue.
I looked at the dev.php
plugin for reference. Currently we do use 'multiple' => true'
in a few examples, but for types post_select
, term_select
, and user_select
the example shortcode seems to be working as expected.
We don't support that attribute on select
type but you can use meta
to pass attributes directly to the select element. This is a little different than what we are doing with the other fields. I've made
a PR to show this in the docs. https://github.com/wp-shortcake/shortcake/pull/759
@christianwach can you point me to where you see the error in docs?
@davisshaver Perhaps "error" was too strong a word. "Omission" might have been a better description since there seems to be no documentation of the fact that multi-selects are possible - even though they work as expected when using meta
to define them. Which is great :)
@christianwach Just wanted to make sure. Could you take a look at #759?
@davisshaver Looks good to me. Thanks for updating.
Thanks. Definitely works with meta => array('multiple'=>true)
and updated docs are very useful
When setting param
multiple
to true when employing a select box it does not render the multiple select box as expected.I have tried adding the addition 'multiple' attribute to the
data.meta
being passed to the template fromviews/edit-attribute-field.js
but the template converts the array into comma separated text. Setting multiple values results in no value being set at all.