Title: Multiple select in new widgets api
Last modified: August 19, 2016

---

# Multiple select in new widgets api

 *  Anonymous User 96400
 * (@anonymized-96400)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/multiple-select-in-new-widgets-api/)
 * Hey,
 * I seem to have a problem getting multiple selects to work on that widget I’m 
   working on. Basically I have something like this:
 * `<select class="widefat" id="<?php echo $this->get_field_id('thumbs'); ?>" multiple
   ="multiple" size="7" style="height:100px" name="<?php echo $this->get_field_name('
   thumbs'); ?>[]">`
 * Normally, the [] at the end in the name field means that it’s gonna be an array
   into which all of the selected options should be saved. But it doesn’t work and
   only saves the last option clicked.
 * Any ideas anybody?
    Cheers!

The topic ‘Multiple select in new widgets api’ is closed to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [multiple](https://wordpress.org/support/topic-tag/multiple/)
 * [select](https://wordpress.org/support/topic-tag/select/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: Anonymous User 96400
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/multiple-select-in-new-widgets-api/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
