So I basically need to select a specific value from the selectbox.
So I am wondering how I can make {{bind-attr}} behave like this:
<select id="research_status" class="form-control">
<option value=""></option>
<option value="finalized" {{bind-attr selected a_variable="finalized"}}>Finalized</option>
<option value="in progress" {{bind-attr selected a_variable="in progress"}}>In progress</option>
</select>
I couldn't find this in the documentation (I haven't looked into it too much though). But if there is another way of doing this that's a little simpler or maybe easier to work with please let me know.
I do not want to endup doing something like this
<select id="research_status" class="form-control">
<option value=""></option>
<option value="finalized" {{bind-attr selected=isFinalized}}>Finalized</option>
<option value="in progress" {{bind-attr selected=isInProgress}}>In progress</option>
</select>
I know we can do it like this, but I do not want to go around creating unncessary variables.
I am retrieving this from a model so it'd be great to just check the value of that model's field and select that specific one in the select box (as shown in my first snippet of code).