Attachments

Theodoulos Iacovou asked on May 5, 2021 10:56

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


Jake Kula answered on May 5, 2021 12:29

Hi Theodoulos,

Is this using Portal Engine with an Online Form web part? Or is this in MVC?

0 votesVote for this answer Mark as a Correct answer

Theodoulos Iacovou answered on May 5, 2021 12:41

Hi Jake,

Is with online form web part.

Thank you

0 votesVote for this answer Mark as a Correct answer

Jake Kula answered on May 6, 2021 07:01

Hi Theodoulos,

The post back on the server-side validation clears the attachment.

You might want to consider adding client-side validation to your form for better user experience, where the server-side validation is a fallback in case client-side fails for some reason.

Client-side validation should stop the attachment being cleared.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 6, 2021 08:36

You can create a custom form control and use HTML 5 uploader instead the old direct file uploader. Or, integrate some third party ASP.Net controls which can hold value after postback.

0 votesVote for this answer Mark as a Correct answer

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