Add the name attribute and since this is a multiple choice, you must add brackets [] at the end of the name. What values would be stored in the name (array).
<select name="select_name[]" multiple="multiple">
What you want to do can be done like this.
<form action="" id="form"> <select multiple name="select_name[]"> <option value="{1:'Y'}">1</option> <option value="{2:'Y'}">2</option> <option value="{3:'Y'}">3</option> <option value="{4:'Y'}">4</option> <option value="{5:'Y'}">5</option> </select> <button type="submit">Отправить</button> </form>
And now in detail. Now each value is a string json . And passing several values, you will have an array on the server that has each value a string json .
And on the server you can already do json_parse (if php there) and take it already from the key=>val values.