title: Grails updating values in form using Ajax
body: <p>I have two groups of radio buttons, the first group represents size and the second group represents quantity along with price. </p>
  
  <p>I'm trying to update the price next to quantity with Ajax when changing the size radio has been changed.</p>
  
  <p>What I have thus far. </p>
  
  <pre><code>&lt;script&gt;
       $(document).ready(function(){
          $("input[name*='size']").click(function() {
              ${remoteFunction(
                  controller:'product', 
                  action:'ajaxSize',
                  params:'\'size=\' + this.value')}
          })  
       });
  &lt;/script&gt;
  &lt;g:formRemote name="myForm"
      url="[controller:'product', action: 'save']" update="updateMe"&gt;
  
      &lt;input type="radio" name="size" value="2x2"&gt;2x2&lt;br&gt;         
      &lt;input type="radio" name="size" value="4x4"&gt;4x4&lt;br&gt;&lt;br&gt;
  
      &lt;input type="radio" name="quantity" value="15"&gt;15 ${price}&lt;br&gt;
      &lt;input type="radio" name="quantity" value="16"&gt;16 ${price}&lt;br&gt;
      &lt;input type="radio" name="quantity" value="17"&gt;17 ${price}&lt;br&gt;
  
  &lt;/g:formRemote&gt;
  </code></pre>
  
  <p>controller</p>
  
  <pre><code>def ajaxSize = {
      println params
      render params
  }
  
  @Transactional
  def save(Product product) {
  }
  </code></pre>