How to add two or more FILE fields in this html form?

  • 0
    Good afternoon. I downloaded this template for creating a form.

    I need to place more than two fields with files in the form and after that an error occurs, the second section with files stops working, while the first (which is at the very bottom) works, and when a file is added to it, it is added to the second. I tried to change the name attributes, it doesn't help. Tell me how you can do it.

    I think I need to change something in JS, but this is a guess, although I tried.

    The main file block is here.
    <div class="form-group form-attachments" data-count="10">
                  <div class="form-attachments__wrapper">
                      <input type="file" name="attachment[]" multiple="">
                      <div class="form-attachments__items">
                          <div class="form-attachments__description">
                              <div>Нажмите чтобы добавить файлы к форме.</div>
                              <div>Можно добавить до 10 файлов размером до 10 мб.</div>
                          </div>
                      </div>
                  </div>
              </div>
    JavaScript Anonymous, Jun 18, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!