$el = new Combobox($params["name"]);
$el->setData(@$params["data"]);
$el->setDataDefault(@$params["empty"]);
+ if (isset($params["multiple"])) {
+ $el->setMultiple($params["multiple"]);
+ $el->name .= '[]'; // Add brackets to the end of name to get back an array on POST.
+ }
if (isset($params["datakeys"])) $el->setDataKeys($params["datakeys"]);
break;
if ($el!=null) {
$el->setFormName($this->name);
if (isset($params["id"])) $el->setId($params["id"]);
- if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
+ $el->localize();
if (isset($params["enable"])) $el->setEnabled($params["enable"]);
if (isset($params["style"])) $el->setStyle($params["style"]);
function addInputElement(&$el) {
if ($el && is_object($el)) {
- if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
+ $el->localize();
$el->setFormName($this->name);
$this->elements[$el->name] = &$el;