JSFiddle - React, Tailwind, and code Playground

by nobuts

HTML

<script>
    function checkValue() {
        var linkemail=document.forms["theForm"]["linkemail"].checked
        if (linkemail) {
                document.getElementById('xtraInfo').style.display='';
        } else {
                document.getElementById('xtraInfo').style.display='none';
        }       
}       
</script>
<form id="theForm" name="theForm" method="post" action="">
  
  <input type="checkbox" name="linkemail" value="y" onclick="return checkValue(this)" /> Check here to link your email.
  
  <div id="xtraInfo" style="display:none;">
  Email <input name="name" type="text" id="name"  />
  </div>
  
</form>