I have a form with select:
<select name="work_days" id="id_work_days" multiple="multiple">
<option value="1">sun</option>
<option value="2">mon</option>
<option value="3">tue</option>
<option value="4">wed</option>
<option value="5">thu</option>
<option value="6">fri</option>
<option value="7">sat</option>
</select>
I would like to render this form field as a group of buttons by means of css and javascript (see screenshot)
I tried to display it as
<input type="button" name="work_days" value="sun">
<input type="button" name="work_days" value="mon">
<input type="button" name="work_days" value="tue">
<input type="button" name="work_days" value="wed">
...
but I couldn't get and validate data from this form on the backend. Select widget would serve the best, but I have no idea how to display it as buttons.
I would be grateful for an idea or an example.