Welcome Guest, Not a member yet? Register   Sign In
Form: Keep Files even though validation fails
#1

Hello together,

I have a specific question.
I am currently working with the forms in CI4 and it works perfect. I've build a lot of Validation into my form. I also managed to keep the values, even though the validation fails.
Sadly, this doesn't work for pictures. Now the problem is: In my case, the form has 12 pictures which are taken by the while the fill in the form.
If the validation fails because they miss a value or something, all the pictures are gone, since they aren't uploaded before you hit the submit of the form.

My question is:
What is the best way to deal with this, so that the users dont need to re-take all pictures if validation fails? Is it possible to upload the pictures as soon as they are taken (even though before the submit event is fired)? If so, space on the webserver is no issue, since those pictures are cleaned via a cronjob every few days.
Or is there a better way I am missing?

I am helpful for any suggestions or points into the right direction!

Thanks a lot,
Paul
Reply
#2

Use AJAX
Reply
#3

Do you mean you need something like "dropzone" ?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB