This happens because you create your form control names dynamically, but you don't really bind them to your questions.
Instead of chosing an arbitrary name like field + i
, you should instead bind on a specific value.
In this stackblitz, I binded the form control names to the label, and as you can see, it works like a charm.
<input [formControlName]="question.label"
questsions.forEach((e, i) => {
if (e.type === 'string' || e.type === 'text' || e.type === 'list') {
group[e.label] = new FormControl(e.value, Validators.required);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…