How to show associated fields if checkbox is checked in customize widget screen using wp_customize?

This is possible with JavaScript. You have to add an event listener to the checkbox and then show/hide the inputs depending on the checked state. Here is an example: checkbx = document.getElementById(“checkbox-id”) input1 = document.getElementById(“input1-id”) input2 = document.getElementById(“input2-id”) checkbx.addEventListener(“change”, () => { if(checkbx.checked){ input1.style.display = “block”; input2.style.display = “block”; }else{ input1.style.display = “none”; input2.style.display = … Read more