Problem: Using Yii 2, I need to build a form that captures tabular data with user-defined dynamic lists of row headers and column headers.
Table 1 is a user-specified list of variable length:
Table 2 is also a user-specified list of variable length:
As part of data collection, we need a tabular form that is a matrix or CROSS of Tables A & B, using the values from Table A and B as row and column headers respectively.
Table 3 would store the results as a long list of (length of A x length of rows and cell values. The rows for this would be generated by a CROSS query and inserted prior to the tabular form being filled by the user.
The prototype works well enough but I have decided that a backend built on Yii 2 is the way to go for the actual product. I am new to Yii and also to the MVC paradigm. Based on a little experimentation and consulting the documentation it seems like each of M, V & C need to have static row and column names. Unfortunately with my problem the rows AND columns are dynamic. I think something like kartik-v’s tabularform or dynagrid extensions could get me part of the way, but how can I overcome the hurdle of needing the rows and columns to be dynamically defined rather than static? If this is not possible with these extensions am I looking at making my own widgets to accomplish this?
Any hints or suggestions would be most welcome.