【发布时间】:2015-07-28 13:07:09
【问题描述】:
这是我的看法
$student = Students_list::find()->orderBy('id')->all();
$editForm = ActiveForm::begin([
'id' => 'student-edit-form',
'action' => 'edit',
'method' => 'post'
]);
echo '<ol style="list-style-type: disc">';
for ($i = 0; $i < count($student); $i++) {
echo '<li><p>' /* $student[$i]['id'] . ' ' . */ . $student[$i]['name'] . ' ' . $student[$i]['surname'] . ' ' . $student[$i]['age'] . '</p></li>';
}
echo '</ol>';
ActiveForm::end();
我的控制器中有一个 editAction。所以我想通过单击将<p> 内容发布到我的控制器,然后在我的editAction 中对其进行编辑。
请告诉我怎么做
【问题讨论】:
-
点击上面的视图会发生什么?
标签: oop model-view-controller yii2