Проблема собственно вот в чем, возможно ли отправить форму не зная точного количества полей в форме <input type="file" />, поясняю
то есть при открытии страницы в форме присутствует всего одно поле для загрузки файла <input type="file" />, но если предположим юзер захотел добавить не один файл, а 5 например, то тогда средствами JS он динамически добавляет в форму несколько полей и получается примерно так:
<form id="test" action="[~[*id*]~]" method="post" enctype="multipart/form-data">
<input name="doc" eform="Документ ::1:" type="text" />
<input type="file" name="attachment[]" accept="text/plain,application/msword,application/jpg,application/pdf,text/html" eform="Attachment:file:0">
<input type="file" name="attachment[]" accept="text/plain,application/msword,application/jpg,application/pdf,text/html" eform="Attachment:file:0">
<input type="file" name="attachment[]" accept="text/plain,application/msword,application/jpg,application/pdf,text/html" eform="Attachment:file:0">
<input type="file" name="attachment[]" accept="text/plain,application/msword,application/jpg,application/pdf,text/html" eform="Attachment:file:0">
<input type="file" name="attachment[]" accept="text/plain,application/msword,application/jpg,application/pdf,text/html" eform="Attachment:file:0">
<input type="submit" value="Отправить" />
<input name="formid" type="hidden" value="test" />
</form>
вот чанк отправки сообщения:
<p>Документ: [+doc+]</p>
<p>Прикреплённый файл: [+attachment+]</p>
а вот что приходи на почту:
Документ: Паспорт
Прикреплённый файл: Array
вот как мне сделать правильную обработку массива (слить массив в одну переменую ) ?