title: Dropdown list to a text field with jQuery?
body: <p>I would like to have a dropdown list with options A, B, C and Custom. When custom is selected, the dropdown would be replaced by a text field so that the user can provide a custom name, if he wishes so.</p>
  
  <p>So, first we have something like this</p>
  
  <pre><code>&lt;select id="foo" name="foo"&gt;
    &lt;option value="a"&gt;A&lt;/option&gt;
    &lt;option value="b"&gt;B&lt;/option&gt;
    &lt;option value="c"&gt;C&lt;/option&gt;
    &lt;option value="custom"&gt;Custom&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>And after custom is selected, the whole dropdown list would transform to this:</p>
  
  <pre><code>&lt;input name="foo" type="text" /&gt;
  </code></pre>