title: How to create a dynamic list of the same form on Yii2?
body: <p>How do I create a dynamic list of the same form and show it on the view on Yii2 (it can be viewed as a list of the same object with different information) Thanks.</p>
  
  <p>I have the following form on /frontend/views/site/example.php
  That form I want to put it on a list.</p>
  
  <pre><code>&lt;div class="site-example"&gt;
      &lt;h1&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;/h1&gt;
      &lt;p&gt;Example of a list:&lt;/p&gt;
  
      &lt;div class="row"&gt;
          &lt;div class="col-lg-5"&gt;
              &lt;?php $form = ActiveForm::begin(['id' =&gt; 'form-example']); ?&gt;
  
                &lt;?=  $form-&gt;field($model, 'email')-&gt;textInput(['readonly' =&gt; true, 'value' =&gt; $email]) ?&gt;
  
                &lt;?=  $form-&gt;field($model, 'lastname')-&gt;textInput(['readonly' =&gt; true, 'value' =&gt; $lastname]) ?&gt;
  
                &lt;?=  $form-&gt;field($model, 'phone')-&gt;textInput(['readonly' =&gt; true, 'value' =&gt; $phone]) ?&gt;
  
              &lt;?php ActiveForm::end(); ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>