S
S
Sergey Okhonko2015-11-11 18:53:01
Yii
Sergey Okhonko, 2015-11-11 18:53:01

Yii how to save data from multiple forms into one table?

There is a large table and I decided to break it into logical components, how can I save the data?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Viktor, 2015-11-11
@master2016

Save consistently. Although it seems to me that it was not worth scattering data over several forms - there are tabs and all sorts of other interface things for this.

A
Andrew, 2015-11-11
@R0dger

Well, I would still make a big form or reduce the array to 1 at the end, because it was not in vain that
$model->attributes = $youArray;
Or will you then assign everything by hand?

N
Nikita, 2015-11-11
@bitver

The easiest option is to store all data in the session, at the last stage - the standard save procedure.

A
Alexander, 2015-11-12
@p0vidl0

For each form, create a scenario in the model and validation rules for each scenario. And save the data one by one by specifying the appropriate script in the controller.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question