Dear,
How do I disable/enable input text by Switcher?
https://imgur.com/eTslxhG
Thanks in advance
Hi,
You can use the following code on your page inside the SCRIPT tag after all the core JS files include:
// On document ready
KTUtil.onDOMContentLoaded(function() {
let input = document.querySelector("input");
let switcher = document.querySelector("#switcher");
switcher.addEventListener("click", function() {
if (input.disabled) {
input.disabled = false;
} else {
input.disabled = true;
}
});
});