Title: Additional data listbox not saving multiple selections
Last modified: September 1, 2016

---

# Additional data listbox not saving multiple selections

 *  [mandy@nepeta](https://wordpress.org/support/users/mandynepeta/)
 * (@mandynepeta)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/)
 * I have added a listbox to my form. When I run it, I can select multiple entries
   and it will highlight them, but when I inspect the saved fields, only the first
   highlighted field is stored.
 * I want to be able to pick up multiple entries. Is there a switch I have missed?
 * Thanks
 * [https://wordpress.org/plugins/wp-file-upload/](https://wordpress.org/plugins/wp-file-upload/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609047)
 * Multiple selection is not supported, however there is a workaround. What is the
   URL of the page with the plugin? I want to do some tests.
 * Nickolas
 *  Thread Starter [mandy@nepeta](https://wordpress.org/support/users/mandynepeta/)
 * (@mandynepeta)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609101)
 * I’m mainly working locally but have a copy up on [http://nepetashowcase.co.uk/video/upload-my-file/](http://nepetashowcase.co.uk/video/upload-my-file/)
 * I would like to make the category list allow multiple selections (and ideally
   drive it from the post category list, but that is a separate issue!). I’m happy
   to use code/ hooks as I am already hooking into it (but not yet in this installation).
 * The site is one of my test ones, so anything you upload will not end up visible
   for all to see.
 * Thanks
 * Mandy
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609125)
 * I cannot see the plugin. Perhaps I need to log in? Never mind.
 * What is the plugin ID (if you haven’t set any then it will be 1). Also, the category
   list is the only user field that you have added?
 * Nickolas
 *  Thread Starter [mandy@nepeta](https://wordpress.org/support/users/mandynepeta/)
 * (@mandynepeta)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609136)
 * Sorry, I had forgotten that I had limited it. I have now reset the guest access
   so you should be able to see it.
 * It is plugin ID 1. I have added 3 fields to date: title, description and category.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609162)
 * please add the following code inside the page where you have the plugin shortcode,
   right after the shortcode:
 *     ```
       <script type="text/javascript">
       window["userdata_1_codes_2"].value = function(field) { var arr = []; for (var i = 0; i < field.options.length; i++) if (field.options[i].selected) arr.push(field.options[i].value); return arr.toString(); };
       </script>
       ```
   
 * it will enable multiselection to the field.
 * Try it and let me know.
 * Nickolas
 *  Thread Starter [mandy@nepeta](https://wordpress.org/support/users/mandynepeta/)
 * (@mandynepeta)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609169)
 * That looks like it has done the trick. Thank you.
 * Mandy
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609211)
 * ok

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Additional data listbox not saving multiple selections’ is closed to 
new replies.

 * ![](https://ps.w.org/wp-file-upload/assets/icon-256x256.png?rev=3252590)
 * [Iptanus File Upload](https://wordpress.org/plugins/wp-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-upload/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [nickboss](https://wordpress.org/support/users/nickboss/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/additional-data-listbox-not-saving-multiple-selections/#post-7609211)
 * Status: not resolved