title: Vue.js Set Radio Buttons Checked Only If Binded Input Type is Radio Button
body: <p>I would like for all the input types I have that are radio buttons to be checked, but for all the other input types not. I use v-bind to pass the input type and I do pass the checked value in a similar value, which works, but it also interacts with other input types in an undesired way, e.g. for my input number, it shows the value you choose to enter to the right, in spite of having set their checked value to false. This is my fiddle <a href="https://jsfiddle.net/cgrwe0u8/6/" rel="nofollow noreferrer">https://jsfiddle.net/cgrwe0u8/6/</a></p>
  
  <pre><code>new Vue({
    el: '#quizz',
    data: {
      questions:[
          {question: 'What is your gender?', answer: '', type: 'radio', checked: 'true'},
          {question:'How old are you?', answer: '', type: 'number', checked: 'false'},
        {question:'How many times do you workout per week?', answer: '', type: 'number', checked: 'false'},
      ],
      index:0
    },
    computed:{
      currentQuestion(){
          return this.questions[this.index]
      }
    },
    methods:{
      next(){
          if(this.index + 1 == this.questions.length)
          this.index = 0;
        else
          this.index++;
  
      },
      previous(){
  
          if(this.index - 1 &lt; 0)
          this.index = this.questions.length - 1;
        else
          this.index--;
      }
  
    }
  })
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;script src="https://unpkg.com/vue"&gt;&lt;/script&gt;
  
  &lt;div id="quizz" class="question"&gt;
      &lt;h2&gt;
        {{ currentQuestion.question }}
      &lt;/h2&gt;
      &lt;input v-bind:type="currentQuestion.type" v-model="currentQuestion.answer" :checked="currentQuestion.checked"&gt;
      {{ currentQuestion.answer }}
  &lt;div class='button' id='next'&gt;&lt;a href='#' @click="next"&gt;Next&lt;/a&gt;&lt;/div&gt;
  &lt;div class='button' id='prev'&gt;&lt;a href='#' @click="previous"&gt;Prev&lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>