2 form in a single page same model

Hi all i have two form in a single page 1st work but when i submit 2nd form then no data submit from 2nd form and re submit first form data. Actually my form is wizard base and use jquery.steps.js for wizard.

I want to submit first form at step 2 and 2nd form at step 4.

my first form like this


<?php $form = ActiveForm::begin( [

        

        'id' => $model->formName().'_step1', 'options' => ['enctype' => 'multipart/form-data']      

    ]); ?>

and end like this


<?php ActiveForm::end(); ?>

after some line of html code 2nd form start


<?php $form = ActiveForm::begin( [


'id' => $model->formName().'_step2',        

				]); ?>

and similar end as


<?php ActiveForm::end(); ?>

Have any body any solutions ?

Thanks in advance

If have never done this before.

Maybe this wizard will help:

Thanks for reply

but my problem is to submit 2nd form not wizard.

<guess>

have you tried renaming the 2nd form to a different variable name eg $secondForm?

</guess>

Yes

my 2nd form id is ‘id’ => ‘form_step2’,

and 1st form id is ‘id’ => ‘form_step1’,

so no similarity in both forms name.