I am in the process of developing an application that enables users to answer questions about themselves. The questions are being retrieved from an API. My next step is to generate a form with these questions as entry fields. I am currently utilizing a method similar to the basic form outlined in this example:
At this point, I am curious to know if it is feasible to construct this form based on the questions provided by my API. Although I can obtain a JSON object containing all the questions, I am unsure if it is possible to implement a for loop that automatically populates the form with the questions from the JSON object. Looking at the code snippet in the example mentioned above, it seems that achieving this may not be straightforward:
this.loginForm = fb.group({
email: ["", Validators.required],
password: ["", Validators.required]
});