Trying to enable all the input elements within a box on the click of a button.
I am following the element type mentioned here → https://www.wix.com/velo/reference/$w/element/type
But for dropdowns, ratings, uploadButtons, address inputs the function does not seem to be working!
It only works for textInputs!
Am I missing something here???
export function editDetailsBtn_click(event) {
$w("#box1").children.forEach((item, i) => {
console.log(item.type)
console.log(item.id);
if (item.type === ("$w.TextInput" || "$w.TextBox" || "$w.RichTextBox" || "$w.RadioButtonGroup" || "$w.CheckboxGroup" || "$w.Dropdown" || "$w.SelectionTags" || "$w.Slider" || "$w.DatePicker" || "$w.UploadButton" || "$w.RatingsInput" || "$w.AddressInput" || "$w.Switch" || "$w.SignatureInput" || "$w.Captcha")) {
let myID = item.id;
console.log(myID);
$w('#' + myID).enable();
}
else {
let myID = item.id;
console.log("cant find match for " + myID);
}
})
}