title: How to hide part of a rails 3 form depending on value selected from dropdown menu
body: <p>I have a a partial, _form for one of my views in rails. It looks like so:</p>
  
  <pre><code>&lt;%= form_for(@project) do |f| %&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label "Project Status" %&gt;&lt;br /&gt;
      &lt;%= f.select :status, ["In Progress", "Cancelled"] %&gt;
    &lt;/div&gt;
  
    &lt;div class="field"&gt;
      &lt;%= f.label "Capital Cost" %&gt;&lt;br /&gt;
      &lt;%= f.text_field :capital_cost %&gt;
    &lt;/div&gt;
  
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>I'd like the "capital cost" part of the form to be greyed out unless "In Progress" is selected from the dropdown menu, without having to reload the page. Is this possible? I saw some solutions using javascript, but I'm a complete beginner and couldn't get my head around them (unfortunately I don't have the time to learn to use js before I have to finish this project). Cheers!</p>