microdot: HTML multiple dropdown list returns only the last selected value
Hi again,
I’ve noticed that HTML select/options list with multiple selection returns only the last selected value in the request.form:
<form method="POST" action="">
<p>
<i class="bi bi-calendar-day"></i>
<label for="weekdays">days:</label>
<select class="form-select" name="weekdays" id="weekdays" multiple>
<option value="" selected hidden disabled>change</option>
<option value="0">Monday</option>
<option value="1">Tuesday</option>
<option value="2">Wednesday</option>
<option value="3">Thursday</option>
<option value="4">Friday</option>
<option value="5">Saturday</option>
<option value="6">Sunday</option>
</select></p>
<button type="submit" name="settings" value="save" class="btn btn-primary">
</form>
Is this an expected/known behavior? Any hints on how to fix it? Thanks!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (8 by maintainers)
Indeed - I got confused with my custom builds, I am sorry.
Now it works like a charm and I can get all multiple elements from the drop-down list. Thank you very much !!