Retrieve selected Select Option value
I tried to retrieve the selected unit_selector data for the key, value in for loop in the value_row class. but it didn't work. It just didn't display anything.
{% if forloop.first %}
<tr class="title_row">
{% for k,v,i,z,b in sorted_title_list %}
{% if k == selected_item %}
{% if b|length == 1 %}
{% else %}
<th><label for="**unit_selector**">
<select class="master_select" id="**unit_selector**" name="unit_selector">
{% for key, value in b.items %}
<option value="{{ value }}" id="{{ key }}">{{ value }}</option>
{% endfor %}
</select>
</label></th>
{% endif %}
{% endif %}
{% endfor %}
</tr>
{% endif %}
<tr class="**value_row **{% if epoch_form.errors %}error{% endif %}">
{% for k,v,i,z,b in sorted_title_list %}
{% if k == selected_item %}
{% if b|length == 1 %}
{% else %}
{% for key, value in b.items %}
{% if unit_selector.key == key %}
<td class="_unit" id="{{ key }}">{{ value }}</td>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
</tr>