0

有一种方法可以使用相同的操作将表单包含在另一个表单中吗?我尝试使用 renderPartial 但不起作用。例如:

$this->renderPartial('//utente/_form', array('model'=>new User, 'condition'=>$condition, 'form' => $form, 'rule' => '3'),假,真);

4

2 回答 2

0
  1. 使用 renderPartial(with return=true) 在时间变量中渲染 first for 的结果。
  2. 在第二个视图中使用变量。

有关详细信息,请参阅 CController renderPartial()

$form1 = $this->renderPartial('firstView', $data1, true);

$this->renderPartial(
    '//utente/_form',
    array(
        'model'=>new User,
        'condition'=>$condition,
        'form' => $form,
        'rule' => '3',
        'form1' => $form1
    ),
    false,
    true
);
于 2013-11-13T14:02:13.640 回答
0

另一个表单中的表单在 HTML 中不起作用!你不能这样做:

<form ...>
      ...
      <form ...>
          ...
      </form>
</form>
于 2013-11-13T14:04:29.727 回答