title: How do I make a text field/select option visible/invisible by selecting a radio button option in HTML?
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
     &lt;body&gt;
        &lt;form&gt;
           /*yes or no radio button option*/ 
           Deduction: &lt;input type="radio" name="option" value="yes"&gt;Yes
           &lt;input type="radio" name="option" value="no"&gt;No
           &lt;br&gt;
  
           /* text field for the amount if yes is selected, if no is selected the amount*/ 
           /* and the affiliate selection shouldn't be showing*/ 
           Amount:&lt;input type="text" name="amount"&gt;
           &lt;br&gt;
              &lt;select&gt;
                 &lt;option value="affiliate"&gt;Select Affiliate&lt;/option&gt;
                 &lt;option value="x"&gt;x&lt;/option&gt;
                 &lt;option value="y"&gt;y&lt;/option&gt;
              &lt;/select&gt;
           &lt;br&gt;
           &lt;br&gt;
           &lt;input type="submit" value="Submit"&gt;
           &lt;br&gt;
        &lt;/form&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So basically if no is selected there is only the submit button. If yes is selected the amount text field is shown and the selected affiliate is shown as well. </p>