title: grails: how to dynamically construct a form?
body: <p>I need to create a dynamic form in grails which has various dynamically created input boxes at runtime, which then submits its params to a controller just like a form created at compile time.  Any ideas?</p>
  
  <p>The view gsp might look like this:</p>
  
  <pre><code>&lt;g:form controller="report" action="view"&gt;          
     &lt;input type="submit" value="Submit"&gt;
     &lt;!-- insert some inuput params here at runtime --&gt;
  &lt;/g:form&gt;
  </code></pre>
  
  <p>and the action controller would be:</p>
  
  <pre><code>class ReportController {
  def view = {
      def someDynamicParam = "someParam"
      if (params["someParam"] != null) {
         ...
      }
  </code></pre>
  
  <p>The problem is I have no idea how to render the form input fields in a way that grails will understand them on submission.</p>