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

#someForm="ngForm" | The someForm.submitted flag is not working. Ionic 4

$
0
0

@murilocardoso wrote:

Hi,

My first problem is about submitting a form.

<form #someForm="ngForm" [formGroup]="myForm" (submit)="doSomething()">
<ion-fab-button type="submit"> </ion-fab-button>
</form>

The code above never triggers the doSomething() function.

Trying to solve my first problem I got another one:

<form #someForm="ngForm" [formGroup]="myForm" (ngSubmit)="doSomething()">
<ion-fab-button type="submit" (click)="someForm.ngSubmit.emit()" > </ion-fab-button>
</form>

The code above triggers doSomething() function but I have some validations that check if someForm.submitted is true but its never get true.

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49282

Trending Articles



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