title: Adding some more fields to the form in yii2 using ajax
body: <p>I have a <code>Yii2 form</code>:</p>
  
  <pre><code>&lt;?php $form = ActiveForm::begin(['id' =&gt; 'que']); ?&gt;
      &lt;?php echo $form-&gt;field($model, 'type')
              -&gt;dropDownList($questionTypes, [
                  'class' =&gt; 'form-control ng-pristine ng-valid ng-touched',
                  'prompt' =&gt; 'Select question type',
                  'ng-model' =&gt; 'que.type',
                  'ng-change' =&gt; 'addAnswerOptions(que);',
          ]);
      ?&gt;
  &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>
  
  <p>On the basis of selected dropdown value, I have to add some more fields to the same form of the same model. What fields will be added, is totally depend on the dropdown value. </p>
  
  <p>How can I do this?</p>