Page 1 of 1

Problem CreateInputSelectList returns only one item..

Posted: Tue Jan 29, 2008 8:41 am
by codecop
Hi all,
i finishing my module but:
If i call print_r('list_po'); i got printed only one last item ID. If i select all 3 items i got Id==3, but it must return array(1,2,3).
This is cms bug or my mistake?


my php looks like this:
//---------------------------------
$this->smarty->assign('list',
$this->CreateInputSelectList($id, 'list_po', $items, array(), 10, '', true)
);
//--------------------------------
html output looks:
pirmasantrastrecias

THANX!

Re: Problem CreateInputSelectList returns only one item..

Posted: Tue Jan 29, 2008 3:01 pm
by calguy1000
Use array syntax for multi select fields.

$this->smarty->assign('list',
  $this->CreateInputSelectList($id, 'list_po[]', $items, array(), 10, '', true)
);