[wp-trac] [WordPress Trac] #20679: Widget with mutliple select doesn't work

WordPress Trac wp-trac at lists.automattic.com
Tue May 15 08:47:19 UTC 2012


#20679: Widget with mutliple select doesn't work
--------------------------+------------------------------
 Reporter:  topweb        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Widgets       |     Version:  3.3.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by topweb):

 Yes here are more details:

 Post parameters when saving are:

 action  save-widget
 add_new
 id_base featuredgames
 multi_number
 savewidgets     b277827e4e
 sidebar left-sidebar-home-page
 widget-featuredgames[2][categoriesIds]  7
 widget-featuredgames[2][categoriesIds]  8
 widget-height   200
 widget-id       featuredgames-2
 widget-width    250
 widget_number   2

 As you can see categoriesIds should be an array from the multiple select.

 I am expecting to get from the update function an array containing both
 submitted values:

 public function update($new_instance, $old_instance) {
      print_r($new_instance);
      die();
 }

 And it actually returns this:
 Array ( [categoriesIds] => 8 )

 I agree, dd32, it maybe not the best UI option but still it it's the
 fastest way
 to achieve it...

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20679#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list