Hello I'd like to ask a question about upload widget, is there a way to keep the file in the upload widget after the page refresh?

The point was we have a page that the user must fill some fields and upload his picture, but if certain field are not filled if the save button is clicked, the page highlights the missing camps and focus on them while sending an error message, when this was tested It was noticed after the page would redirect back to itself and the upload widget is empty, so how Does one keep the upload widget from erasing the file?

I have tried to save the file and was thinking about refile theupload widget on preparation, but it seems not possible to fill the upload widget, like a any other input widget...


Thank You


Norman In

IN the method for the submit button use "Ajax Submit" instead of "Submit". This should resolve the issue as it won't refresh the page in case of validation errors. 


Cheers.

Upload suggest submit, on the other hand refresh ajax must be ajax submit :)

Hi Norman

For upload you need submit method, so you do validation in Ajax submit.

like,

1) create 2 buttons one for Ajax submit and other for submit

2) validate and save the form in Ajax 

3) Once validation is done, call using action Widgetclick action to click the submit button for upload image 


thanks,

Balasubramanian 

Balu Prakasam wrote:

Hi Norman

For upload you need submit method, so you do validation in Ajax submit.

like,

1) create 2 buttons one for Ajax submit and other for submit

2) validate and save the form in Ajax 

3) Once validation is done, call using action Widgetclick action to click the submit button for upload image 


thanks,

Balasubramanian 

ok thank you