Php Yii2:如何发送不';我不属于那种模式
我需要从视图向控制器发送一个表单,以及一个不属于该模型的数组 我总是使用以下句子发送我的表格:Php Yii2:如何发送不';我不属于那种模式,php,forms,yii2,Php,Forms,Yii2,我需要从视图向控制器发送一个表单,以及一个不属于该模型的数组 我总是使用以下句子发送我的表格: <?= Html::submitButton('Send') ?> 现在我还需要发送一个名为colors的数组,您可以在表单中添加所需的所有字段 <input type='text' class='form-control' name = 'yourname[your_index]' > 在$post中,您可以使用 $model->load($post
<?= Html::submitButton('Send') ?>
现在我还需要发送一个名为colors的数组,您可以在表单中添加所需的所有字段
<input type='text' class='form-control' name = 'yourname[your_index]' >
在$post中,您可以使用
$model->load($post)
与模型无关的值位于中
$post[yourname[your_index]]
$post[yourname[your_index]]