Link to home
Start Free TrialLog in
Avatar of logicjb
logicjb

asked on

Check for file upload on submit

Hi

I currently have a HTML form with a file uplaod field within it, I would like to have a javascript check so that everyone HAS to upload a file to submit the form.

At the moment I have a javascript variable being set to True when the file field changes, and a check for true when it is submitted. But people are still not uploading files. Is there a better way to ensure a file is selected?
Avatar of logicjb
logicjb

ASKER

BTW: There are 3 file fields all named: <input ... name="file[]"> ...

Only one file has to be uploaded
ASKER CERTIFIED SOLUTION
Avatar of Joe Wu
Joe Wu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
Community Support Moderator