Jump to content

file upload form validation with filename keeping/passing


mataiand

Recommended Posts

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 :)

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....

:)

 

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?????????

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.