I guess that is where my question originates... I have added the
multiple="multiple" in the form xml file. The html displays correctly
in such that it shows a multi-select list... But the items are never
selected. I will try adding the [] to see what that does. Since they
were not selected I wondered if it was a bug or something I missed.
On Dec 7, 4:43 pm, Christophe Demko <
chde...@gmail.com> wrote:
> You can have multiple="true" or multiple="multiple"
>
> The adding of [] at the end of the field is not necessary (see line
> 483 of formfield.php)
>
> On 7 déc, 21:52, Phil Snell <
p...@snellcode.com> wrote:
>
>
>
>
>
>
>
> > make sure the field name also has [] at the end, for array. like testlist[]
> > Mark Dexter wrote:I think you just add multiple="multiple" as an attribute in the <field> element. For example; <field name="testlist" type="list" multiple="multiple" default="" label="test label" multiple="multiple" description="test desc" > Mark On Tue, Dec 7, 2010 at 10:05 AM, geeffland<
g...@effland.org>wrote:Any good advice on how to do a multi-select list for an admin view?... not sure the admin part is significant... I had a view which loads a form and in the form I have <field name="testlist" type="list" multiple="multiple" default="" label="test label" description="test desc" > <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> <option value="5">Option 5</option> </field> Then in the template I do the typical $this->form->getLabel and $this-form->getInput functionsThen in the database I save the field "testlist" as "1, 2, 3"... I added some code in the table file that writes the array as an imploded(", ", $opt) type... which works... the problem I have is how do I get the list to show the proper selections when it renders? It always comes out with nothing selected... Is there a different data format I need to use in the DB? or some other code missing? I found some cases in modules that use multi-select lists but no components. Thanks, Greg -- You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group. To post to this group, send an email
tojoomla...@googlegroups.com. To unsubscribe from this group, send email
tojoomla-dev-c...@googlegroups.com. For more options, visit this group athttp://
groups.google.com/group/joomla-dev-cms?hl=en-GB.