Select2 4+ Multiple Select POSTing as string as oppose to an array

25 views
Skip to first unread message

williams...@gmail.com

unread,
Jul 12, 2017, 1:55:27 PM7/12/17
to select2
Hey,

Working on a ASP.Net project and trying to upgrade from v3.x to v4. However, my project has been designed around handling http posts of multiple selected values as a string, so selecting values 1 and 4 from

<input type="text" class="select2class">
<option value="1">Alabama</option>
...
<option value="4">Wyoming</option>
</select>


will post

variablename "1,4"

But now, with v4 and having to use the <select> instead of <input> tag, the values are now being posted as an array, as

variablename 1
variablename 4


My project is quite huge and will need to refactor practically the entire back end if there's no fix. Trying to avoid using any major kind of hacks at the same time. Any ideas?

Reply all
Reply to author
Forward
0 new messages