title: Loading part of form via ajax. Extra form tag. Yii2
body: <p>I need load part of form by ajax, but yii2  itself added tags form. Should create html without tags Form</p>
  
  <pre><code>&lt;?php $form = new \yii\widgets\ActiveForm(); ?&gt;
  
  &lt;div id="cropped_image"&gt;
      &lt;img class="image" height="&lt;?=$size-&gt;getHeight();?&gt;" width="&lt;?=$size-&gt;getWidth();?&gt;" src="&lt;?=$imageModel-&gt;getImageUrl()?&gt;"/&gt;
  
      &lt;div class="inline-labels"&gt;
          &lt;?= $form-&gt;field($cropModel, 'x1')-&gt;hiddenInput()-&gt;label(false); ?&gt;
          &lt;?= $form-&gt;field($cropModel, 'y1')-&gt;hiddenInput()-&gt;label(false); ?&gt;
  
          &lt;?= $form-&gt;field($cropModel, 'x2')-&gt;hiddenInput()-&gt;label(false); ?&gt;
          &lt;?= $form-&gt;field($cropModel, 'y2')-&gt;hiddenInput()-&gt;label(false); ?&gt;
  
          &lt;?= $form-&gt;field($cropModel, 'w')-&gt;hiddenInput()-&gt;label(false); ?&gt;
          &lt;?= $form-&gt;field($cropModel, 'h')-&gt;hiddenInput()-&gt;label(false); ?&gt;
  
          &lt;?= $form-&gt;field($cropModel, 'image')-&gt;hiddenInput()-&gt;label(false); ?&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Result is </p>
  
  <pre><code>&lt;form id="w0" action="/admin/image/create" method="post"&gt; &lt;input type="hidden" name="_csrf" value="M0NMbk9xaEhnMx5eOEArG3EuegQoPV0yXG58XX4EAwBsMSo0KTsEKQ=="&gt; &lt;div id="cropped_image"&gt; &lt;img class="image" height="631" width="946" src="/upload/image/cec8e8f39a3cdd43.jpg"/&gt; &lt;div class="inline-labels"&gt; &lt;div class="form-group field-cropform-x1 required"&gt; &lt;input type="hidden" id="cropform-x1" class="form-control" name="CropForm[x1]"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="form-group field-cropform-y1 required"&gt; &lt;input type="hidden" id="cropform-y1" class="form-control" name="CropForm[y1]"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="form-group field-cropform-x2 required"&gt; &lt;input type="hidden" id="cropform-x2" class="form-control" name="CropForm[x2]"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="form-group field-cropform-y2 required"&gt; &lt;input type="hidden" id="cropform-y2" class="form-control" name="CropForm[y2]"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="form-group field-cropform-w required"&gt; &lt;input type="hidden" id="cropform-w" class="form-control" name="CropForm[w]"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="form-group field-cropform-h required"&gt; &lt;input type="hidden" id="cropform-h" class="form-control" name="CropForm[h]"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div class="form-group field-cropform-image required"&gt; &lt;input type="hidden" id="cropform-image" class="form-control" name="CropForm[image]" value="cec8e8f39a3cdd43"&gt; &lt;div class="help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;
  </code></pre>
  
  <p>If i add this part not by ajax - all working fine,  just one tag.</p>