21298 Posts in 5735 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 663 Views |
-
ListboxField

5 January 2011 at 8:48pm
Hi!
I need help with ListboxField. I use this to select more than 1 value in my select. This code seems correct but when save field in my record in database i found 'array' and not my values. This is my code...$source = array(
"1" => "one",
"2" => "two",
"3" => "three"
);$fields->addFieldToTab('Root.Content.Main', new ListboxField('ss_multikeyword','Parole chiave',$source,$value = 1,'',$multiple=true), 'Content');
Thanks!
-
Re: ListboxField

6 January 2011 at 10:06am
Try:
$lista = array(
"1" => "one",
"2" => "two",
"3" => "three"
);$field = new ListboxField('ss_multikeyword', "Parole Chiave", $source= $lista );
$field->setMultiple(true);
$fields->addFieldToTab("Root.Content.Main", $field);
Bye
-
Re: ListboxField

12 October 2011 at 4:36am Last edited: 12 October 2011 4:36am
You need to increase the size of element greater than 1
$fields->addFieldToTab('Root.Content.Main', new ListboxField('ss_multikeyword','Parole chiave',$source,$value = 1,10, $multiple=true), 'Content');
| 663 Views | ||
|
Page:
1
|
Go to Top |


