Answer the question
In order to leave comments, you need to log in
How to get an array from a form?
I add a field to the form like this
<?= $form->field($model, 'sort[' . $model->id . ']', ['options' => ['tag' => false], 'template' => '{input}'])->hiddenInput() ?>
Answer the question
In order to leave comments, you need to log in
in the validation, a number is written,
and here are strings
["sort"]=> array(5) { [14]=> string(1) "1" [13]=> string(1) "2" [....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question