title: Display Dynamic Fields with Radio Buttons in MVC
body: <p>I have a partial view in my MVC site that is used for search parameters for a specific page.  In this partial, I am displaying parameters dynamically based on a specific ID number. Some of these parameters need to allow the user to either enter an exact value or a range of values.  This is what I have so far:</p>
  
  <pre><code>&lt;form id="DynamicFieldsForm"&gt;
      @{
          List&lt;DynamicParameter&gt; ddParams = dal.GetParameters();
          foreach (DynamicParameter dp in ddParams.OrderBy(d =&gt; d.ParameterName))
          {
              &lt;div&gt;
                  &lt;div class="form-group col-lg-12"&gt;
                      &lt;div class="designerDataParamRangeSelect"&gt;
                          &lt;input type="radio" id="@(dp.ParameterID)_RadioExact" value="exact" /&gt;Exact&lt;br /&gt;
                          &lt;input type="radio" id="@(dp.ParameterID)_RadioRange" value="range" /&gt;Range
                      &lt;/div&gt;
  
                      &lt;input class="form-control" type="text" id="@(dp.ParameterID)_Lower" name="@(dp.ParameterID)_Lower" placeholder="@dp.ParameterName Lower" value="" @maxLength /&gt;
                      &lt;div id="hideThis"&gt;
                          &lt;input class="form-control" type="text" id="@(dp.ParameterID)_Upper" name="@(dp.ParameterID)_Upper" placeholder="@dp.ParameterName Upper" value="" @maxLength /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          }
      }
  &lt;/form&gt;
  </code></pre>
  
  <p>This partial view is also displayed after the specific ID is selected from a dropdown.  I have the UI working... that's not the issue.  What I need help with is how do I display or hide the input field in the <code>"hideThis"</code> div when the <code>"_RadioRange"</code> radio button is selected.  I am sending these values to a controller from a javascript function and that all works too.  I just need assistance with displaying and hiding of these fields.  Any help is much appreciated.</p>