Hi all, i wonder if there is a way to enable a button only after a file is selected via an Upload Button. I though i could edit the onClick event for the Upload Button, but i see that there is none generated when i use it... like as if the button itself was an event-trigger that does not need coding for the click event.
Thanks in advance.
Hi Alessandro Demontis
Are you trying to do ? ->
A button is disabled when the page loads....
Only after the user selects any file in the upload button, the button should be enabled ......
If it is, then ->
#uploadButton1 - Upload Button
#button1 - Button
$w.onReady(function () { $w('#button1').disable(); $w('#uploadButton1').onChange( (event) => { //upload Button if($w('#uploadButton1').value.length > 0) { $w('#button1').enable(); } else { $w('#button1').disable(); } }); });
For Reference - >
https://www.wix.com/corvid/reference/$w/uploadbutton/onchange
https://www.wix.com/corvid/reference/$w/uploadbutton/value