<?php $listid=$name.uniqid(); ?>
<div class="mb-1 filecontainer" 
     data-uploader-init="false" 
     data-process="idle"
     >
    <input 
           id="file<?= $name ?>" 
           type="file" 
           class="d-none" 
           name="<?= $name ?>" 
           <?php 
    $addtype="";
           if(isset($field->multiple)) { $addtype="[]"; echo "multiple"; } 
           if(isset($field->accept)) { echo " accept='".$field->accept."'"; } 
           ?> 
           />
    <div id="<?= $listid ?>" class="files-container">
        <?php


    foreach($this->getFilearray($name) as $num => $val){
        $file=$val['file'];
        $description=$val['description'];
        include("file-part.php");
    }

        ?>
    </div>
    <div class="flex align-items-center fs-small file-add lh-0 mt-2">
        <div class="v-icon"><img src="app/images/plus-lg.svg"></div><span class="file-add-text pl-3">Ajouter un fichier</span>
    </div>
</div>
