Hi
I have created a form in angular that contains ion-checkboxes. When I submit the form values to the database the ion-checkboxes default to “true” rather than the value of the checkbox. My code is:
<ion-item>
<ion-label>What are you interested in?</ion-label>
</ion-item>
<ion-item>
<ion-checkbox value="Junior Coaching" formControlName="interestedin"></ion-
checkbox>
<ion-label>Junior Group Coaching</ion-label>
</ion-item>
<ion-item>
<ion-checkbox value="Adult Coaching" formControlName="interestedin"></ion-
checkbox>
<ion-label>Adult Group Coaching</ion-label>
</ion-item>
<ion-item>
<ion-checkbox value="Holiday Camps" formControlName="interestedin"></ion-
checkbox>
<ion-label>Junior Tennis Holiday Camps</ion-label>
</ion-item>
<ion-item>
<ion-checkbox value="Individuals" formControlName="interestedin"></ion-
checkbox>
<ion-label>Individual Lessons</ion-label>
</ion-item>
So I would like them to tick as many of the 4 options as they wish, and the name of what they have ticked to appear in my database. The 4 options appear under 1 question so assuming I need to send an array to the database? Any ideas would be hugely appreciated. Many thanks