I have three models - Form, Field and Options. One form can have multiple fields and user can dynamically add new fields while creating form. Also, user can add multiple options for each field dynamically (e.g. option for select or radio type field) and save/edit them along with the form.
Since we do not know in advance how many fields and options user will add, we can’t instantiate fields and option instances in controller before rendering the view. Further, I am also confused how to represent this data in view. I know I’ll have to use arrays and increment the array id when user adds new fields and options but I am not able to put everything together.
Could anyone please help me with this. Thanks in advance!