Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mallaury's avatar

multiple select does not work on Edge

Hello,

I am trying to send some POST data in a multiple select. Like that:

<select name="datas[]" multiple>
	...
</select>

In my controller, I do that:

foreach($request->datas as $data){
	...
}

Everything work perfectly. But It does not work with Edge. I get a 500 error. $request->datas doesn't seem to be an array. And if I cast it I don't get the 500 error but the foreach is ignored...

Is Edge incompatible with multiple select ?

Thanks !

0 likes
5 replies
bobbybouwmann's avatar

This should normally work just fine... Are you sure the data is sent correctly? You can dump the data by doing something like this

dd($request->all());

You can then compare it with another browser and see if you get the same results.

mallaury's avatar

Yes sorry I already try to dump the $request.

In Edge the $datas variable just don't appear. I just have "_method" and "_token". Everything is good in firefox and Chrome

bobbybouwmann's avatar

I googled around and I only see javascript workarounds, this is probably not what you want but I don't think there is another solution

mallaury's avatar

Yes that's strange nobody get this error... Maybe it happens because I'm using a searchable select with "MDBootstrap" ?

shez1983's avatar

have u looked into the repo MDBootstrap maybe they have a warning/caveat of some sort.

Please or to participate in this conversation.