Hello,
Since the upload widget doesn't have a disable property, so I tried using Javascript.
document.getElementById($parameters.InputFileId).disabled = true;
But it isn't working. Do you have any solution to this?
Cheers!
Hi Esrom,
For the specified use-case, try with the below-mentioned JavaScript code.
JavaScript Snippet
var uploadWidget = document.querySelector('#' + $parameters.UploadWidgetId + ' > input'); uploadWidget.setAttribute("disabled", "disabled");
Hope this helps you!
Kind regards,
Benjith Sam
This works like magic. Thanks, Benjith!
You're welcome, Esrom.
Glad to help you :)
I suggest using this component for File Upload.
https://www.outsystems.com/forge/component-overview/7405/reactfilepondupload
can any one provide me the oml
Hi Sarah,
Sure, refer to the attached oml file.
JS Snippet:
document.querySelector('#' + $parameters.FileUploadId + ' > input[type="file"]').disabled = true;
Demo screen: DisableUploadWidget
I hope this helps you!