<td class="text-center"> <select name="criteriaColumn[{{ column_number }}]" size="1"> <option value=""> </option> {% for column in column_names %} <option value="{{ column }}" {%- if column is same as(selected) %} selected="selected"{% endif %}> {{- column -}} </option> {% endfor %} </select> </td>