vishnu
vishnu

Reputation: 4599

How to set value for dynamically generated form using angular 4

I have angular 4 form which is generated dynamically using the configuration(JSON) file. And i want to set the value for input field while choosing the selectbox option.

I have created the sample code in stackblitz.

https://stackblitz.com/edit/angular-dnhcd1?file=src/app/dynamic-form-component.ts

Upvotes: 0

Views: 2111

Answers (1)

vishnu
vishnu

Reputation: 4599

I have found a solution to set the value.

this.issuerConfigForm.controls['iinprefix'].patchValue("20");

Upvotes: 1

Related Questions