Jump to content

Multiple select value in drop down box


Recommended Posts

Hello everyone,

 

I want to select multiple value from the drop down box. here is my code...... 

 

         array(
                    'type' => 'select',
                    'multiple' =>true,
                    'label' => $this->l('Week Days:'),
                    'name' => 'weekdays',
                    'lang' => true,
                    'options' => array(
                        'query' => $weekdays,
                        'id' => 'id',
                        'name' => 'name',
                        'selected' =>'selected',
                    ),
                ),

 

But the above code is not working properly. whenever i select multiple values from the drop down box and store into the database it is take last selected value and store into the database instead of storing multiple value . The above code i wrote in renderForm(). please help me I didn't find and solution,

 

Thanx in advance..

 

 

  • Like 1
Link to comment
Share on other sites

  • 9 months later...
×
×
  • Create New...