Answer the question
In order to leave comments, you need to log in
Why does the form tag in my code close immediately, but after the closed form there are fields?
There is code at the end of the table that makes a line with the form fields:
<? $form = ActiveForm::begin(['id' => 'addextra-form']); ?>
<tr class="addextra-tr"><td>
<?=$form->field($model,'question')->label('Question:');?>
</td>
<? foreach ($analyse as $anal) { ?>
<td>
<?=$form->field($model,'scores[0]['.$anal['login_id'].']')->label('Points:');?>
</td>
<? } ?>
</tr>
<? $length = count($analyse); ?>
<tr><td colspan="<?=$length?>"></td>
<td>
<?=Html::submitButton('Save Extra Questions', ['class' => 'btn btn-primary extra-btn']);?>
</td></tr>
<?ActiveForm::end();?>
</table>
<form id="addextra-form" method="post" action="/index.php?r=tender/analyse&action=all&id=56"></form>
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