Link to home
Create AccountLog in
Avatar of mikecraft
mikecraft

asked on

Magento change dropdown to multi selection box

Hi I am working on a custom module, where it will export orders. currently it works great, but I can only select 1 status at the time, how can I change the dropdown to a multiple box so more than 1 statuses can be selected.
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Add a multiple attribute to the select
multiple="multiple"

Open in new window

and then build your SQL based on looping through the select to get all the selected options.
Avatar of mikecraft
mikecraft

ASKER

hi thanks for the response, yes I did that and for the php i created a foreach loop with all the selections and when I did a print_r for the value I would see the multiple selections on the screen, but when running the report. it would not select the right statuses.

what i am using this for is a custom order reports, where I should be able to select all status or multi select the ones I need. and the reports generates a CSV file.
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Can you show more code depicting how you use the values?