title: Dropdown in Ruby on Rails: show some other fields, buttons... depending on the selection
body: <p>I'm working on a view. The view has a dropdown menu and i want to add other fields to the view, depending on the index i selected in the dropdown.</p>
  
  <p><a href="http://abload.de/image.php?img=unbenanntcajcc.png" rel="nofollow">http://abload.de/image.php?img=unbenanntcajcc.png</a></p>
  
  <p>at ... i want to show other stuff like textfields. (i'm using bootstrap for styling)
  thats the code:</p>
  
  <pre><code>&lt;div class="col-md-4"&gt;
  &lt;div style="height: 452px; overflow: auto"&gt;
      &lt;div class="btn-group"&gt;
          &lt;button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"&gt;
              Select a Filter &lt;span class="caret"&gt;&lt;/span&gt;
          &lt;/button&gt;
          &lt;ul class="dropdown-menu" role="menu"&gt;
              &lt;li&gt;&lt;a href="#"&gt;First name&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Last name&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Occupation&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Location: Birth&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Location: Marriage&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Location: Death&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Location: Burial&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Time: Birth&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Time: Marriage&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Time: Death&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Time: Burial&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Relatives &lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;br /&gt;
      ...
      &lt;br /&gt;
      &lt;button type="button" class="btn btn-success"&gt;+&lt;/button&gt;
      &lt;br /&gt;
      &lt;br /&gt;
      &lt;button type="button" class="btn btn-default"&gt;Add filter&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>