mataiand Posted January 21, 2009 Share Posted January 21, 2009 hey, I'm wondering if this is possible or not. I have a multiple file upload form with other text-fields. At click I'm validating the form (name filled out, e-mail valid or not, file submitted, etc...) In case of something wrong it jumps back to the form. I pass over the information the user filled out already. The question is, can I somehow pass over the files browsed, because right now, it seams that if I already selected files and an other text-field is missing, after validation, when it jumps back to the form I have to select the file(s) again. So if the user already selected, I don't want make hime select it again. thx Link to comment https://forums.phpfreaks.com/topic/141725-file-upload-form-validation-with-filename-keepingpassing/ Share on other sites More sharing options...
pradeepa Posted January 21, 2009 Share Posted January 21, 2009 you can submit the form after filling all fileds. means rather than php validations use javascript validations. if any field is blank then it must give alert before submitting the form. then no need to upload files again use for loop for javascript validation and take an unique id like for(int i=1;i<count;i++) { if(email =="") { alert("error"); return false; } else { return true; } } i given rough idea implement it according to your functionality.... Link to comment https://forums.phpfreaks.com/topic/141725-file-upload-form-validation-with-filename-keepingpassing/#findComment-741931 Share on other sites More sharing options...
mataiand Posted January 21, 2009 Author Share Posted January 21, 2009 the thing is that I'll use jQuery validation, I just want to make it available for everyone. for example to people who turned off JS. so if JS available -> jQuery validation if JS is off -> php validation so, without JS, just in html, php is it possible????????? Link to comment https://forums.phpfreaks.com/topic/141725-file-upload-form-validation-with-filename-keepingpassing/#findComment-742161 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.