Forums

Multiple files upload

rajaMansoor 01 Nov, 2015
Hi All,

I have a multi-page form which has one page to upload different files, in that page user can upload upto 6 different files, minimum number required are 3.

So the issue is if user upload same file for example abc.docx in all three mandatory fields then only one file is uploaded abc.docx.

I want to restrict user to not upload same file on all fields. Is there any option available.


Thanks in Advance


Raja Mansoor
GreyHead 01 Nov, 2015
HI Raja,

It might be possible to check using JavaScript to make sure that the three file names are different as a custom validation. Otherwise I think you would have to do a serverside validation after the form has submitted. You can check the information in the $_FILES array to see if the files have the same name.

Bob
rajaMansoor 01 Nov, 2015
Dear Bob,

Thank you for your reply.

Can you elaborate a little about server side validation.

Where do i have to put the code and which code ?

Thanks

Raja Mansoor
rajaMansoor 01 Nov, 2015
Dear Bob,

I already have server validation as it is 3 pages form so I turned on server validation to make sure data from page one and two are being submitted.

Can I add the files upload check in the same validation ?


Thank you

Raja Mansoor
GreyHead 03 Nov, 2015
Hi Raja,

No I'm afraid not. you have to add this using a Custom Code action :-(

Bob
This topic is locked and no more replies can be posted.