1

I have a mandatory file upload field in Sitecore forms that should be disabled based on a condition of a dropdown field. Even after making the mandatory upload field optional, Sitecore is still expecting a file to be uploaded.

Is there any way to overcome this issues? Kindly find the screenshot for reference.

enter image description here

2

1 Answer 1

1

This is a known issue in sitecore forms. Please follow the below workaround.

As you can see the fxb.30da5a39-2ca9-487a-89c5-5b9f4328569f.Fields[2a03d066-f884-4106-8bf3-b5c18e79e287] field is my Single Line Text field. Now if I wanted to post the form without the required field data, then I’d just change the posted form data to my liking: enter image description here

https://www.maartenwillebrands.nl/2021/07/28/sitecore-forms-bypassing-validation-and-overposting-viewmodels/

1
  • This is a link-only answer. Please provide detail so that the answer can be understood without leaving the SSE site.
    – Marek Musielak
    Aug 22 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.