0

There's a way to include form inside another form using the same action? I tried with renderPartial but doesn't work. eg:

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

mariobros
  • 859
  • 4
  • 12
  • 31

2 Answers2

0
  1. Use renderPartial(with return=true) to render result of first for in temporal variable.
  2. Use the variable in second view.

See CController renderPartial() for details

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

$this->renderPartial(
    '//utente/_form',
    array(
        'model'=>new User,
        'condition'=>$condition,
        'form' => $form,
        'rule' => '3',
        'form1' => $form1
    ),
    false,
    true
);
TUNER88
  • 923
  • 1
  • 20
  • 36
0

Form inside another form doesn't work in HTML! You can't do this:

<form ...>
      ...
      <form ...>
          ...
      </form>
</form>
CreatoR
  • 1,654
  • 10
  • 14