J
J
JohnDaniels2016-07-09 16:16:01
MySQL
JohnDaniels, 2016-07-09 16:16:01

How to work with large forms in yii2?

There is a site on yii2, you need to add a megaform for 320 fields.
Immediately the questions arose - how to save such data correctly? a 320-column table seems a little off to me.
If you store form_id , input_id , value in a table, you will get an insert of 320 rows. how to organize the model in this case? Are there any goodies in yii for this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Arutyunov, 2016-07-09
@arutyunov

How often will the data be filled in? What kind of form is this with 320 fields? Is it possible to group the data?
At a minimum, you should use the wizard to fill out the form step by step.
In terms of the server, I won’t tell you anything, because I would start looking for options to shorten the form / fields, group them into small models.

D
Dmitry Kim, 2016-07-09
@kimono

For such perversions, it seems to me that it is better to use a direct record in the cells of an Excel document. Take 320 text fields and sign by column names.
Of course, this approach is possible if you just need to save the data and forget about it (post a link to the finished file, for example).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question