-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Select Multiple Not Working inside repeaters #780
Comments
Hey there! Are you using the stable version downloaded from wordpress.org or the development branch from this repo? (I forgot to change the version to |
ok, I think I know what goes on here. You've set |
Thanks, But select multiple > 1 is not working in repeater field. Inside repeater field, select 'multiple' => 999, displays normal select dropdown. Can't select multiple options.
|
Unfortunately multi-select is not yet supported inside repeater fields... I'm marking this one as a feature request and pinging @fovoc to see if we can add it in the next release. 👍 |
Any updates on multiselects in repeaters? Thanks. |
If I remember correctly this one was fixed... |
After spending a couple of hours trying to solve this issue, I think I have found the problem: It's the line 310 in kirki/controls/php/class-kirki-control-repeater.php where the already selected values (in the array field.default) will be compared with the available select choices:
As you can see the (field.default == i) can only be true if field.default is a single value like ["2"]. That's the reason the multiple-select shows the value correctly if only a single one was defined in the database. Multiple defined values won't work with this code because the field.default will be an array like ["2", "6", "146"]. Since this issue here is closed, I've opened a new issue (#1876) and will address that with a pull request, if this is okay for you. Best regards. |
Issue description:
For select field, multiple option > 1 doesn't work.
It removes all sections completely from customizer except the default ones.
multiple = 1 brings everything back to normal
JS errors:
Error: downloadable font: rejected by sanitizer (font-family: "dashicons" style:normal weight:normal stretch:normal src index:0) source: xxx/wp-includes/fonts/dashicons.eot
Error: TypeError: invalid 'in' operand data.value
Source File: xxx/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,underscore,customize-base,wp-a11y,customize-controls,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,&load%5B%5D=jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,jquery-ui-sortable,jquery-ui-button,jquery-ui-spinn&load%5B%5D=er,nav-menu&ver=4.4.2 line 13 > Function
Error: NetworkError: A network error occurred.
Version used:
2.2.6
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: