Form validation with input file upload
-
Hello,
First, thank you for your plugin it’s perfect !
I just have a question.
I have a form where people can submit photo.
I want to validate the form to be sure that at least one photo is uploaded.So i use the hook : acfe/form/validation/post/form=creation_ajout
The probleme is that because it’s an input file (i think) the field is always empty.Here is my form :
https://prnt.sc/9PWAv-4b2NSJHere is my code :
https://prnt.sc/1roRwOJrHizYHere is the content of the email i send to myself to check the content :
a:3:{i:0;a:1:{s:6:”Photos”;b:0;}i:1;a:1:{s:6:”Photos”;b:0;}i:2;a:1:{s:6:”Photos”;b:0;}}And whenever the first upload file is empty or not i always trigger the error.
Is there something i can do to check if the first file is empty or not ?
Thank you ??
- The topic ‘Form validation with input file upload’ is closed to new replies.