[SOLVED] Angular reactive form not submitting selected option values

Issue I have the following form dinamically populated with multiple select inputs <form [formGroup]=”searchForm” (ngSubmit)=”onSubmit(searchForm.value)”> <div class=”col-md-2″ *ngFor=”let filter of this.filters; index as i”> <div class=”form-group”> <select formArrayName=”filters” size=”5″ class=”form-control” (change)=”onSelectChange($event)”> <option [ngValue]=”null” value=”-1″ disabled class=”first-option-item”>{{ filter.name }}</option> <option *ngFor=”let

Continue reading

[SOLVED] Angular form mode toggling

Issue lets say that we have a very basic angular reactive form, with two modes: edit and show. And in show mode input fields are disabled, and in edit mode enabled: <form [formGroup]="formGroup" (ngSubmit)="submitForm()" novalidate> <label for="fname">First name:</label><br /> <input

Continue reading

[SOLVED] Input change event will not work on input formControl?

Issue <div class="start-time-wrapper"> <input class="form-control" type="text" placeholder="From" [ngxTimepicker]="start" [format]="24" formControlName="startTime" (change)="startTimeChange($event, i)"> startTimeChange(startTime, i){ this.orderForm.value.date[i].time.endTime = this.addMinutes(startTime); console.log(this.orderForm.value); } createItem(): FormGroup { return this.formBuilder.group({ date: [”], time: this.formBuilder.group({ startTime: [”], endTime: [”], }), }); } addItem(): void { this.date =

Continue reading