when checkbox checked show the input tag on yii2
<script>
function myFunction() {
var checkBox = document.getElementById("myCheck");
var text = document.getElementById("hiddenDiv");
if (checkBox.checked == true){
text.style.display = "block";
} else {
text.style.display = "none";
}
}
</script