Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49329

How do I get the value of the ion-radio without having to choose any options?

$
0
0

I have a pre-selected radio input and I need to pass the value to the form, the problem is that it’s not working, it’s empty.

             <ion-radio-group  v-model="accept" value="yes">
                  <ion-item>
                      <ion-label>Yes</ion-label>
                      <ion-radio slot="start" value="yes"></ion-radio>
                  </ion-item>
                  <ion-item>
                      <ion-label >No</ion-label>
                      <ion-radio slot="start" value="no"></ion-radio>
                  </ion-item>
              </ion-radio-group>

I tried v-model and IonChange

With IonChange , it works, but only if I click on another option.

Does anyone know how I can get the value of the radio input without having to switch options or change anything?

Thank you.

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>