Answer the question
In order to leave comments, you need to log in
How to save data from edit/create form if it uses foreach?
How can you display this kind of data?
$form = $this->beginWidget('booster.widgets.TbActiveForm',[
'id' => 'horizontalForm',
'htmlOptions' => array('class' => 'well'),
'method' => 'post'
]);
foreach ($doors as $door) {
echo $form->textFieldGroup($door, 'sum',['label'=>'Стоимость '.$door->s->short_name]);
}
foreach ($doors_r as $door) {
echo $form->textFieldGroup($door, 'sum',['label'=>'Возврат '.$door->s->short_name]);
}
$this->widget('booster.widgets.TbButton',[
'buttonType' => 'submit',
'label' => 'send'
]);
$this->endWidget();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question