title: HTML form element hidden onload javascript
body: <p>Trying to get a HTML text input to be hidden on load, but then if a radio button is checked then the form will show.</p>
  
  <p><a href="http://pastie.org/private/ah39ul5h4jtmlntkbmmda" rel="nofollow">http://pastie.org/private/ah39ul5h4jtmlntkbmmda</a></p>
  
  <p>I've got it working sort of, I just need the field to be hidden on page load.</p>
  
  <pre><code>&lt;form action="profile_edit_gravatar.php" method="post"&gt;
      &lt;label class="radio inline"&gt;
          &lt;input type="radio" &lt;?php if($row[16]=='account') {echo ' checked';}?&gt; onload="this.form.otheremail.style.visibility='hidden';" onclick="
              if (this.checked) {
              this.form.otheremail.style.visibility='hidden';
              } else {
              this.form.otheremail.style.visibility='visible';
              }
              return true;
          "&gt;
          Use &lt;?php echo $row[3];?&gt;
      &lt;/label&gt;
      &lt;input type="text" name="otheremail"&gt;
  &lt;/form&gt;
  </code></pre>