title: Add one more same set of inputs on click rails
body: <p>How can I add one more same set of inputs for example for education object, so I will have 2 new education objects after submitting? Preferable new set needs to be shown by clicking on icon that goes after existing set of inputs.</p>
  
  <p>This is my <code>new</code> method:</p>
  
  <pre><code>def new
    @user = User.new
    @user.educations.build
    @user.works.build
  end
  </code></pre>
  
  <p>And my view for it:</p>
  
  <pre><code>&lt;%= simple_form_for [:admin, @user] do |u| %&gt;
        &lt;%= u.error_notification %&gt;
  
        &lt;%= u.input :name, label: "Name" %&gt;
        &lt;p&gt;&lt;b&gt;Photo&lt;/b&gt;&lt;/p&gt;
        &lt;%= image_tag(@user.photo_url, size: "80x90",
                      class:"img-rounded") if @user.photo? %&gt;
        &lt;%= u.input :photo, label: false %&gt;
        &lt;%= u.input :tel, label: "Tel.:" %&gt;
  
        &lt;h3&gt;Education&lt;/h3&gt;
        &lt;hr&gt;
        &lt;%= u.simple_fields_for :educations do |e| %&gt;
          &lt;%= e.input :name, label: "University" %&gt;
          &lt;%= e.input :year_started, label: "Started" %&gt;
          &lt;%= e.input :year_finished, label: "Ended" %&gt;
        &lt;% end %&gt;
  
        # icon `+`
        &lt;i class="fa fa-plus fa-2x"&gt;&lt;/i&gt;
  
        &lt;h3&gt;Work&lt;/h3&gt;
        &lt;hr&gt;
        &lt;%= u.simple_fields_for :works do |w| %&gt;
          &lt;%= w.input :name, label: "Name" %&gt;
          &lt;%= w.input :year_started, label: "Started" %&gt;
          &lt;%= w.input :year_finished, label: "Ended" %&gt;
        &lt;% end %&gt;
  
  
        &lt;%= u.button :submit, "Надіслати" %&gt;
  &lt;% end %&gt;
  </code></pre>