How to do something like this multiple inputs

Hello :)

I needing your help. I need to do form like this below, with inserting it to one table in DB.

My query looks like:

INSERT INTO `results` 

     (`result_id`, `result_performer`, `result_portal`, `result_count` 


    (NULL, '6', '1', '11'), 

    (NULL, '6', '2', '22');

Values <=> input

(NULL, '6', [color=&quot;#0000FF&quot;]'1', '11'[/color]), 

(NULL, '6', [color=&quot;#2E8B57&quot;]'2', '22'[/color]);

And I want to match it to MultipleInputs or Tabular form (something like excel). In attachment is a preview I wanted it do something like this.

I tried many different widgets TabularInput and I have still problem with this. I have no idea how to resolve this problem.

What problem do you have exactly?

Have you read the guide on the topic?

I have problem with generate form (i’m newbe). At table header I want to show “Performer” title and additional columns depends on the number of portals in the database (if i had 3 portals in DB, the table must have 4 columns [performer, portal 1, portal 2, portal 3]). Aand generate rows depends on number performers in db and at first column want to show name.

So if someone fill fields “portal 1” and “portal 2” for example in first row, the query seems to be look like (NULL, ‘1’, ‘1’, ‘11’), (NULL, ‘1’, ‘2’, ‘11’).

And for second row (performer_id =2) if someone fill only last field (portal 3), the query seems to be look like (NULL, ‘2’, ‘3’, ‘99’).

One field filled, generates insert to database with parameters (performer_id, portal_id, "and data from input").

And i have no idea, how to start with something like this and how to generate a form as I wrote above, based on records from the database (portals columns).

What you are trying to build isn’t trivial and you seem to be unfamiliar with the basics of Yii. The best course of action might be to spend a week or two working through the guide: