How to save data from the form edit/create if it uses the foreach?

How to display data of similar type?

$form = $this->beginWidget('booster.widgets.TbActiveForm',[
 'id' => 'horizontalForm',
 'htmlOptions' => array('class' => 'well'),
 'method' => 'post'
]);

foreach ($doors as $door) {
 echo $form->textFieldGroup($door, 'sum',['label'=>'Value '.$door->s->short_name]);
}
foreach ($doors_r as $door) {
 echo $form->textFieldGroup($door, 'sum',['label'=>'Return '.$door->s->short_name]);
}
$this->widget('booster.widgets.TbButton',[
 'buttonType' => 'submit',
 'label' => 'send'
]);
$this->endWidget();


Maybe someone wrote similar actions are creating/editing? Not necessarily in Yii, just like using foreach
March 19th 20 at 08:37
0 answer

Find more questions by tags Yii