This is a dropdown selection box where user can choose page and then click the submit button to go to that page Im using Django 2.2, don't know how to make the button go to the selected link
gradovi.html
{% block content %}
<div class="row">
<form>
<div class="input-field">
<select>
<option value="" disabled selected>Izaberite grad</option>
{% for grad in gradovi %}
<option value="{{grad.grad_slug}}">{{grad.grad_ime}}</option>
{% endfor %}
</select>
<label>Materialize Select</label>
</div>
<button class="btn waves-effect waves-light" type="submit" name="select">
<i class="material-icons right">send</i>
</button>
</form>
</div>
{% endblock %}
Thanks to @Diego Avila this is final code
{% block content %}
<div class="row">
<div class="input-field">
<select id="select">
<option value="" disabled selected>Izaberite grad</option>
{% for grad in gradovi %}
<option value="{{grad.grad_slug}}">{{grad.grad_ime}}</option>
{% endfor %}
</select>
</div>
<button class="btn" onclick="redirectToMyPage();"><i class="material-icons">send</i></button>
</div>
<script>
function redirectToMyPage(){
location.href = document.getElementById('select').value;
}
</script>
{% endblock %}