Post back issue on attachments

Theodoulos Iacovou asked on October 11, 2021 11:20

Hello guys,

I have built a form where contains various of fields and attachments.

Why after of a wrong input(validation error) the attachments files are gone and need to resubmitted them?

Any solution to avoid this?

Thank you

Recent Answers


Juraj Ondrus answered on October 12, 2021 10:02

What version are you using? It seems that you are using some older version - the file uplaoder control there is pretty old so it clears its value on postback. The colution is creating a custom form control and use AJAX or HTML5 uploaders.

0 votesVote for this answer Mark as a Correct answer

Theodoulos Iacovou answered on October 12, 2021 10:18

Hello,

I am using Kentico 11,

How can I use HTML5 uploaders?

Thanks

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on October 12, 2021 10:28

You can create your custom form control and use the code you want. There are several articles, packages and code samples available on this topic on the Internet.

0 votesVote for this answer Mark as a Correct answer

Theodoulos Iacovou answered on October 12, 2021 10:46

Thanks, any example of ajax code?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.