title: In a dynamic form add a "Remove" button and send all the input value to laravel controller to store in db
body: <p>I am using Laravel 7. Here I am using a dynamic form there clicking on &quot;Add More&quot; I can add same type of input fields. I want to add a remove button beside the new row to remove the new row which is add by click on &quot;Add More&quot; button. Also Clicking on &quot;Submit&quot; Button I want to send the data to controller to store it in DataBase.</p>
  <p>My blade part:</p>
  <pre><code> &lt;div class=&quot;card-body&quot;&gt;
                 
                 &lt;div class=&quot;div-repeat-notification&quot; style=&quot;display: none;&quot;&gt;
                        &lt;div class=&quot;row&quot;&gt;
                          &lt;div class=&quot;col-md-4&quot;&gt;
                            &lt;div class=&quot;form-group&quot;&gt;
                              &lt;label for=&quot;&quot;&gt;Name :&lt;/label&gt;
                              &lt;input type=&quot;text&quot; name=&quot;cn_name[]&quot; value=&quot;&quot; class=&quot;form-control&quot; placeholder=&quot;Name&quot;/&gt;
                            &lt;/div&gt; 
                          &lt;/div&gt;
                          
                          &lt;div class=&quot;col-md-4&quot;&gt;
                            &lt;div class=&quot;form-group&quot;&gt;
                              &lt;label for=&quot;&quot;&gt;Email :&lt;/label&gt;
                              &lt;input type=&quot;text&quot; name=&quot;cn_email[]&quot; value=&quot;&quot; class=&quot;form-control&quot; placeholder=&quot;Email&quot;/&gt;
                            &lt;/div&gt; 
                          &lt;/div&gt;
                          
                          &lt;div class=&quot;col-md-4&quot;&gt;
                            &lt;div class=&quot;form-group&quot;&gt;
                              &lt;label for=&quot;&quot;&gt;Phone :&lt;/label&gt;
                              &lt;input type=&quot;text&quot; name=&quot;cn_phone[]&quot; value=&quot;&quot; class=&quot;form-control&quot; placeholder=&quot;Phone&quot;/&gt;
                            &lt;/div&gt; 
                          &lt;/div&gt; 
                        &lt;/div&gt;
                        &lt;/div&gt;
                        
                        &lt;a style=&quot;float:right;color:#fff;&quot; class=&quot;div-repeat-notification_add_more btn btn-rounded btn-danger btn-sm&quot; onclick=&quot;addMore('.div-repeat-notification')&quot;&gt;Add More&lt;/a&gt;
  
                &lt;/div&gt;
  </code></pre>
  <p>my js part:</p>
  <pre><code> $(document).ready(function(){
      $('.div-repeat-notification_add_more').before($('.div-repeat-notification').html());
      
    })
    function addMore(vr){
      var html = $(vr).html();
      //$(vr+'_add_more').before(html);
      $(vr+'_add_more').before('&lt;div class=&quot;div-repeat-notification&quot;&gt;'+html+'&lt;/div&gt;');
    }
  </code></pre>
  <p>this is adding row dynamically. I want a remove button beside new row . and submit button to send data to the controller. Note: I am not using any model.</p>