[Solved] Multiple select in a GET form => only one $parameter value?
This is an open discussion with 4 replies, filed under General.
Search
Try changing the name to name="key[]"
making the field get an array instead of single value.
It's standard HTML behaviour, and I missed it the first time around too ;o)
I'll be darned. I don't know why I didn't know about that. That does indeed result in $url-key.1
, $url-key.2
etc parameters, which should do what I want.
Thanks, John!
No problem.
When I use the square brackets [] they are escaped (%5B%5D) in the url.
How can I prevent the escaping?
EDIT It pass indeed an array. So solved ;-)
Create an account or sign in to comment.
If I add this to a form:
...and mark them all and submit the form, it results in the GET parameters
?key=value1&key=value2&key=value3
.However, Symphony generates a
$url-key
parameter with only the valuevalue3
, so the last value of the strings wins out. I was hoping for$url-key = 'value1, value2, value3'
instead.Is this a bug or intended behavior?