How to use ActiveForm inside jui Accordian

Hello everyone!

i am new to yii framework… can anyone help me how to use ActiveForm inside jui Accordian widget

I have two types of login… so i need Accordian for each type of login

Source Code

<?php

use yii\helpers\Html;

use yii\bootstrap\ActiveForm;

use yii\jui\Accordion;

$this->title = ‘Login’;

$this->params[‘breadcrumbs’][] = $this->title;

?>

<div class="site-login">

<h3><?= Html::encode($this->title) ?></h3>

<?php

?>

<?php

echo Accordion::widget([


'items' =&gt; [


    [


        'header' =&gt; 'Subscriber Login',


        'content' =&gt; '',


    ],


    [


        'header' =&gt; 'Client Login',


        'content' =&gt; '',


       


    ],


],


'options' =&gt; ['tag' =&gt; 'div'],


'itemOptions' =&gt; ['tag' =&gt; 'div'],


'headerOptions' =&gt; ['tag' =&gt; 'h3'],


'clientOptions' =&gt; ['collapsible' =&gt; true],


]);


?&gt;





&lt;br/&gt;





&lt;p&gt;Please fill out the following fields to login:&lt;/p&gt;

// I need this code inside Accordian Content

&lt;?php &#036;form = ActiveForm::begin([


    'id' =&gt; 'login-form',


    'options' =&gt; ['class' =&gt; 'form-horizontal'],


    'fieldConfig' =&gt; [


        'template' =&gt; &quot;{label}&#092;n&lt;div class=&#092;&quot;col-lg-3&#092;&quot;&gt;{input}&lt;/div&gt;&#092;n&lt;div class=&#092;&quot;col-lg-8&#092;&quot;&gt;{error}&lt;/div&gt;&quot;,


        'labelOptions' =&gt; ['class' =&gt; 'col-lg-1 control-label'],


    ],


     ]); 


?&gt;





&lt;?= &#036;form-&gt;field(&#036;model, 'username')-&gt;textInput(['style'=&gt;'width:400px']); ?&gt;





&lt;?= &#036;form-&gt;field(&#036;model, 'password')-&gt;passwordInput(['style'=&gt;'width:400px']); ?&gt;





&lt;?= &#036;form-&gt;field(&#036;model, 'rememberMe', [


    'template' =&gt; &quot;&lt;div class=&#092;&quot;col-lg-offset-1 col-lg-3&#092;&quot;&gt;{input}&lt;/div&gt;&#092;n&lt;div class=&#092;&quot;col-lg-8&#092;&quot;&gt;{error}&lt;/div&gt;&quot;,


])-&gt;checkbox() ?&gt;





&lt;div class=&quot;form-group&quot;&gt;


    &lt;div class=&quot;col-lg-offset-1 col-lg-11&quot;&gt;


        &lt;?= Html::submitButton('Login', ['class' =&gt; 'btn btn-primary', 'name' =&gt; 'login-button']) ?&gt;


    &lt;/div&gt;


&lt;/div&gt;





&lt;?php ActiveForm::end(); ?&gt;

</div>

You can use like this :


'items' => [

        [

            'header' => 'Subscriber Login',

            'content' => $this->renderPartial('file name', 

				['model'=>$model,

			]),

        ],

     ]

I hope it is useful for you… :D :)

Thank you for your reply :) :)