Hi Robert,
Sorry for delay.
We have validated your sample and
found an issue in formControlName. Please refer the below code snippet.
[main-form.component.ts]:
export
class
MainFormComponent
implements
OnInit {
mainFormGroup: FormGroup;
@Input('formGroupName') groupName: string;
constructor(private
fb: FormBuilder) {}
…
private
createGroup() {
return
this.fb.group({
[this.groupName]: [null, [Validators.required]],
durationRepresentationStart: [null, []],
durationRepresentationEnd: [null, []],
});
}
[child-form.component.html]:
<ejs-radiobutton
#radio1
label="First Checkbox"
[name]="isFirstForm ? 'name1' : 'name2'"
value="small"
checked="true"
(change)="onChange($event)"
[formControlName]="groupName"
>
For your convenience, we have
attached the sample link.
Sample link: https://stackblitz.com/edit/zoom-with-radio-button-fq9cqq?file=components%2Fmain-form%2Fmain-form.component.ts
Please get back
to us if you need further assistance on this.
Regards,
Yuvan Shankar A