Skip to content

Commit

Permalink
fix: Uploading files via Contract form (#491)
Browse files Browse the repository at this point in the history
Added missed multipart/form-data
Added missed multiple name attribute
Closing DIV tag matches nothing
  • Loading branch information
githubjeka committed Aug 8, 2022
1 parent 92d180b commit d48f3e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Contact/views/contact/form.php
Expand Up @@ -31,6 +31,7 @@
<div class="card-body p-5 text-center">
<?= Form::tag()
->post($url->generate('site/contact'))
->enctypeMultipartFormData()
->csrf($csrf)
->id('form-contact')
->open()
Expand All @@ -40,7 +41,7 @@
<?= Field::email($form, 'email') ?>
<?= Field::text($form, 'subject') ?>
<?= Field::textarea($form, 'body')->addInputAttributes(['style' => 'height: 100px']) ?>
<?= Field::file($form, 'attachFiles')
<?= Field::file($form, 'attachFiles[]')
->containerClass('mb-3')
->multiple()
->hideLabel()
Expand All @@ -67,4 +68,3 @@
</div>
</div>
</div>
</div>

0 comments on commit d48f3e0

Please sign in to comment.