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

How to get the values of dynamically created input fields before submitting in Angular/Ionic?

$
0
0

I would like to get the values of dynamically created input fields before submitting in Angular/Ionic before submitting but I don’t find the way. My final goal is to do a sum of these values.

My html:

<ion-slides (ionSlideDidChange)="slideChanged()">
  <ion-slide *ngFor="let custo of (customers | async)">
    <div class="slide"> 
      <ion-item *ngFor="let stuff of (ordereditems | async)"> 
        <ion-label position="floating" color="primary"> Paid amount</ion-label>    
        <ion-input type="text" formControlName="amount_{{custo.pe_id}}"></ion-input>            
      </ion-item>           
    </div>
  </ion-slide>
</ion-slides>

My ts:

this.customers.subscribe((value) =>
{
  for (let c of value) 
  { 
    console.log(this.validations_form.controls[`amount_${c.pe_id}`]);
  }
});

Thanks for reading so far & Please help :slight_smile:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70919

Trending Articles



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