Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70754

Slides component in ionic with form validation

$
0
0

@ashley_shookhye wrote:

Dear All,

I am currently using an ion-slides component with a template-driven form on it which i am using to view data from an array of objects. I have 2 buttons which is used to slide to previous and next slides. With these 2 buttons, I can check the form validity. Unfortunately using the swipe gesture, i cannot detect the form validity. Please check some code below. Hope it can help to

<ion-slides (ionSlideWillChange)="getForm(empForm)">
<ion-slide class="ion-slide-main" *ngFor="let employee of employees">
<button type="submit" (click)="goToNextSlide(empForm)">  </button></div>
 <form novalidate autocomplete="off" #empForm="ngForm">
   <ion-row class="emp-row">
   </ion-row>
 </form>
</ion-slide>
</ion-slides>

I am guessing since the template variable empForm is outside the for loop, it is not possible to access each form instance created in the for loop. Can someone advise how I may access those form instances?

Thanks,
Ashley

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70754

Trending Articles



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