Home » Snippets » Browse Snippet

Browse Snippet

JFieldList multiple doens't get selected items
Apache Software License
Programming Language


Joomla 1.7.1. bug in library/joomla/html/html/select.php
if (is_array($options['list.select'])) { foreach ($options['list.select'] as $val) { $key2 = is_object($val) ? $val->$options['option.key'] : $val; if ($key == $key2) { $extra .= ' selected="selected" '; break; } } } elseif ((string)$key == (string)$options['list.select']) { $extra .= ' selected="selected" '; }
when you use mulitple list $options['list.select'] is an object and not a array
so if you have selected items in a multiple list the items aren't selected
hmm i think i explain it wrong i try agian euhm:
i'm trying to use jformfieldlist and is set multiple to multiple and i get the data form my database
jformfieldlist gets the this->value as object and get the select html from library/joomla/html/html/select.php
there it checks if $options['list.select'] is an array. but $options['list.select"] isn't a array but a object

Files in this snippet:

No files for this snippet
Submitted by Michael V on 2011-11-17 05:57:53

©2005-2020 Open Source Matters, Inc. All rights reserved. Joomla Hosting by Rochen Ltd.    Accessibility Statement    Privacy Policy    Gforge