Setting up Yii2 Builder

Hello,

I am new to Yii and currently working on a project using Yii2.

I have installed Kartik’s Yii2 Builder using composer, but I am getting the error: Class ‘kartik\widgets\ActiveForm’ not found.

Below is the code in _form.php:




    use kartik\widgets\ActiveForm;

    use kartik\builder\Form;

    $form = ActiveForm::begin(['type'=>ActiveForm::TYPE_INLINE]);

    echo Form::widget([

    'model'=>$model,

    'form'=>$form,

    'attributes'=>$model->formAttribs

    ]);

    // Add other fields if needed or render your submit button

    echo '  ' . Html::submitButton('Submit', ['class'=>'btn btn-primary']);

    ActiveForm::end();



What am I missing ?

I appreciate any help from the forum members.

I have same problem!!

i fix this error installed the dependends of extension…

NOTE: This extension depends on the kartik-v/yii2-widgets extension, which in turn depends on the yiisoft/yii2-bootstrap extension. Check the

composer.json for this extension’s requirements and dependencies.