I got in form #1: Input and select. and in the form #2 the same fields and the checkbox. How pass the values of the form #1 to the form #2 when i clicked the checkbox?
HTML code:
<mat-form-field>
<input matInput placeholder="Nombre" formControlName="names" required>
<mat-error *ngIf= "f?.names?.errors?.required">
Name field empty or not valid, please check
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Provincia </mat-label>
<mat-select formControlName="province" required>
<mat-option *ngFor="let p of provincies" [value]=p?.locationCode>{{p.locationName}}</mat-option>
</mat-select>
</mat-form-field>
Checkbox on form #2:
<mat-checkbox>Same info?</mat-checkbox>
document.formsand it will return you an array with all the forms in the view.