So, Im a new face in Yii2 and I am glad Gii exists. Currently I have 3 tables.
Forms with the field: id.
Fields with the fields: Id, Form_id and Question(text).
Replies with the fields: Id and Reply(text).
Forms and Fields have also generated CRUD from Gii and the Id fields have a relationship.
The idea is to send an ID to a widget and create a form with all the Questions that have that ID.
Then, insert each Question Id with the text value from the form to the Replies table
How should I work? Is it a Gii shortcut and work from there by copying the view into the widget??
Short example: we have 2 forms. Form with Id:1 and form with Id:2. We choose Id:2, so the widget gets from the Fields table every row with Id=2 and creates a list with (lets say) 5 Questions with the Id and a textbox to the side. When the submit button is pressed, the Id and the textbox value are inserted as Id and Reply to the Replies table.