title: How do I submit a boolean value to Firebase based on the selected option from a radio button
body: <p>Good evening, I have attempted to get a boolean value stored in Firestore based on the selected value from my radio button group in Vue. I am using Bootstrap Vue to build out a sign up form wizard and one of the tabs involves a user selecting one of two options and depending on the selected answer, the store value in firestore should be true or false. I will paste the code I have so far below:</p>
  <pre><code>&lt;template&gt;
      &lt;b-container&gt;
          &lt;h2 class=&quot;register&quot;&gt;Register&lt;/h2&gt;
  
           &lt;form-wizard @on-complete=&quot;addFields&quot; title=&quot;&quot; subtitle=&quot;&quot; back-button-text=&quot;Back&quot; next-button-text=&quot;Next&quot; finish-button-text=&quot;Submit&quot; color=&quot;#5b9bd5&quot;&gt;
              &lt;tab-content title=&quot;Account Type&quot;&gt;
                &lt;b-container&gt;     
                  &lt;b-row class=&quot;justify-content-center&quot;&gt;
                      &lt;b-col cols=&quot;3&quot;&gt;
                          &lt;b-form-group label=&quot;Choose your account type&quot;&gt;
                              &lt;b-form-radio v-model=&quot;selected&quot;  value=&quot;Option1&quot;&gt;Option1&lt;/b-form-radio&gt;
                              &lt;b-form-radio v-model=&quot;selected&quot;  value=&quot;Option2&quot;&gt;Option2&lt;/b-form-radio&gt;
                          &lt;/b-form-group&gt;
                      &lt;/b-col&gt;
                  &lt;/b-row&gt;
                &lt;/b-container&gt;
              &lt;/tab-content&gt;
              &lt;tab-content title=&quot;Perspective&quot;&gt;
                &lt;b-container&gt;
                  &lt;b-row class=&quot;justify-content-center&quot;&gt;
                    &lt;b-col cols=&quot;3&quot;&gt;
                      &lt;b-form-checkbox-group&gt;
                         &lt;b-form-checkbox-group
                                              id=&quot;checkbox-group-1&quot;
                                              v-model=&quot;selected1&quot;
                                              :options=&quot;perspectives&quot;
                                              name=&quot;perspectives-1&quot;
                                              stacked
                                              &gt;&lt;/b-form-checkbox-group&gt;
                          &lt;/b-form-checkbox-group&gt;
                      &lt;/b-col&gt;
                  &lt;/b-row&gt;
              &lt;/b-container&gt;
             &lt;/tab-content&gt;
          &lt;/form-wizard&gt;
      &lt;/b-container&gt;
  &lt;/template&gt;
  </code></pre>
  <p>here is the data() code below that i use to interact with firebase:</p>
  <pre><code>export default {
      name: '',
      data(){
          return {
              selected: 'Option1',
          }
      },
      methods: {
          addUser(){
              db.collection('user').add({
                      if(selected === 'Business'){
                          isOption1: this.selected
                      }
                  })
                  .catch(err =&gt; {
                      console.log(err)
                  })
          }
  
      }
  }
  </code></pre>
  <p>the code above works if i dont use the if statement but then i only get the selected value itself store in Firestore. What I would like to do is store true or false if the selected value === Option1. Can someone please help? I've googled and youtube'd to no real avail since most questions don't cover my exact case.</p>