I'm pretty sure you can find this code on the internet. The purpose of the DaniWeb Forum is to help people who are stuck with a programming problem and are not able to solve it. Try solving this problem yourself and if you get stuck, we are here to help you out. We will not however, do the code for you.
Here is a start...
Here you go, This will show a Input[text] if you check the checkbox.
if (chk.checked == 1)
alert("You didn't check it! Let me check it for you.")
chk.checked = 1;
<input type="text" value="hey" style="display:none"><input oncheck="validate(this.id)" type="check">
// It might not be oncheck im just guessing off top of my head.