[Vuejs]-Disable button if none of the radio buttons are clicked

0👍

I think a good option would be to pass an id parameter to the button element (DOM), and use this in your array to mark a question as filled/open and also show/hide the button.

0👍

Here you go man, use v-model.

<h3>Is this a question?</h3>

<label><input type="radio" name="option" value="option" v-model="radioValue">Yes</label>
<label><input type="radio" name="option" value="option" >Maybe</label>
<label><input type="radio" name="option" value="option" v-model="radioValue">No</label>

<button type="button" class="btn btn-default" :disabled="!radioValue">Next question</button>

I hope it helps.

Leave a comment