In express I am rendering a handlebar template populating a form with values.
To populate my select options I set the "value" property of my select node like so:
<select class="inputField" name="gender" value="female">
<option value="male">Männlich</option>
<option value="female">Weiblich</option>
</select>
Visually the male option is selected though. Can anyone explain why this is happening?
EDIT 1:
I am aware of the selected property, but it makes stuff more complicated when templating, so I'd rather pass down the selected value.
But to be more precise on my original question:
why does this work then:
var genderEl = document.getElementById('genderSelect');
genderEl.value = "female";