Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eddy1992's avatar

selected option not working when using v-model

Hi I have a select which looks like this -:

<select class="form-control c-select" v-model="signUpUserTypeSelected" name="user_type" >
                
                <option selected>Parent</option>
                <option>Student</option>
                <option>Teacher</option>
            </select>

Now the select selected option is not working on it please assist.

My app.js for signUpUserTypeSelected,

const app = new Vue({
    el: '#app',

    data: {
        signUpUserTypeSelected: '',
        signInUserTypeSelected: '',
    },

Please assist how will I solve this issue

0 likes
5 replies
tykus's avatar

Your options have no values?

eddy1992's avatar

@tykus no they have -:

<select class="form-control c-select" v-model="signUpUserTypeSelected" name="user_type" >
                <option disabled value="">Please select one</option>
                <option value="Parent">Parent</option>
                <option value="Student">Student</option>
                <option value="Teacher">Teacher</option>
            </select>
tykus's avatar

Something else is wrong in that case; they code you have shared is fine. Are there any errors in your browser's Console?

tykus's avatar

You're not trying to consume signInUserTypeSelected rather than signUpUserTypeSelected - dumb question perhaps, but it's got to be asked in the absence of anything else?

Please or to participate in this conversation.