How to send two different form values in a button click RRS feed

  • Question

  • User-1744141586 posted

    I need to send MobileNo and Id of below code, while clicking last button(Request OTP). How it is possible? Can anyone help me out...

    <form id="register-form3" #registrationForm="ngForm" (ngSubmit)="OnSubmit(MobileNo.value)">
    <ion-list id="register-list11">
    <ion-item id="register-input8">
    Phone Number
    <ion-input type="number" #MobileNo ngModel name="MobileNo"placeholder=""></ion-input>
    <button id="register-button7" ion-button color="positive" block>
    Search Bank
    <div class="row" *ngIf="userClaims">
    <div class="col s12 m7">
    <div class="card">
    <div class="card-content">
    <div *ngFor="let order of userClaims" style="border: 1px solid lightgrey; padding: 15px; margin: 5px 0;">
    <span> Id : {{ order.Id |json }}</span> <br>
    <span>Name : {{ order.Name | json }}</span> <br>
    <span>Address : {{ order.Address }}</span> <br>


    <button id="register-button8" ion-button color="positive" type="button" (click)="OnPress(MobileNo.value, Id.value)" block>
    Request OTP

    Wednesday, March 28, 2018 5:56 AM

All replies

  • User-1516073966 posted


    Create an hidden field as a ngModel and submit the form with both.

    <ion-input type="hidden" #Id ngModel name="Id"></ion-input>



    Thursday, March 29, 2018 6:38 AM