vue.js disable input conditionally
vue.js disable input conditionally
To eliminate the disabled property, set its value to false. It should be the Boolean value false, not the string ‘false’
If the value is validated as 1 or 0, then set disabled property based on that value
<input type="text" :disabled="validated == 1">
Just check with this,
<button @click="disabled = !disabled">Toggle Enable</button> <input type="text" id="name" class="form-control" name="name" v-model="form.name" :disabled="disabled">