Problem CreateInputSelectList returns only one item..

General project discussion. NOT for help questions.
Post Reply
codecop
New Member
New Member
Posts: 9
Joined: Wed Sep 19, 2007 12:56 pm

Problem CreateInputSelectList returns only one item..

Post 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!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Problem CreateInputSelectList returns only one item..

Post by calguy1000 »

Use array syntax for multi select fields.

$this->smarty->assign('list',
  $this->CreateInputSelectList($id, 'list_po[]', $items, array(), 10, '', true)
);
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “General Discussion”