Attachment field must have a file to submit form

Further to ...

It all works nice now (except it goes to SPAM). But I cannot submit the form without attaching a file it throws an Invalid Path 500 error.

Client will need to submit the form but will not always have a file to attach. How can I get around that?

Hi Brad,
Use a condition and use {{$_POST.yourFileInput.name}} as an expression i.e. check if the file input has a file selected.

  • then > upload + send email with attachment
  • else > send mail without attachment

Wow, that was super easy! And I learned how to do something new as well!

Wappler is freakin’ amazing. Thanks again!

1 Like