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
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
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
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
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
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
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
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
This topic is locked and no more replies can be posted.
