Level 47
v-if="type == 'Applicant'". Notice the ' to declare a string. With out the ' it's looking for a variable.
So pretty much I have a select dropdown with a v-model="type" property.
<select name="user_type" id="" class="Form__element" v-model="type">
<option value="" selected>Who are you?</option>
<option value="Applicant">Applicant</option>
<option value="Employer">Employer</option>
</select>
Then I have a template with a v-if="" on it.
<template v-if="type">
<div class="Form__group">
<input type="text" name="age" id="" class="Form__element date age" placeholder="DOB mm/dd/yyyy">
</div>
<div class="Form__group">
<select name="gender" id="" class="Form__element gender">
<option value="" selected>Gender</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
</template>
So pretty much, if the v-if uses an integer, (v-if="type = 1"), it works fine. However, I am obviously not using an integer for my selected option value. I am using a string, which does not work (v-if="type == Applicant"
Please or to participate in this conversation.