title: How can I add a parameter to a submit button without using JavaScript?
body: <p>My form has a list of items, and each item has a delete button.  I need to submit the index of the item to be deleted, along with the other values of the form (for further editing).</p>
  
  <p>With JavaScript, it looks like this:</p>
  
  <pre><code>&lt;g:form method="post" mapping="defaultAction" id="${paymentInstance?.id}"&gt;
      &lt;g:hiddenField name="id" value="${paymentInstance?.id}"/&gt;
      &lt;g:hiddenField name="version" value="${paymentInstance?.version}"/&gt;
      &lt;g:hiddenField name="deleteAdjIdx"/&gt;
      &lt;g:each in="${paymentInstance?.adjustments}" var="adj" status="idx"&gt;
          &lt;g:set var="adjName" value="adjustments[${idx}]"/&gt;
          &lt;g:textField name="${adjName}.dollars" value="${adj.dollars}"/&gt;
          &lt;g:actionSubmit action="deleteAdj" value="delete" onclick="jQuery('#deleteAdjIdx').val(${idx})"/&gt;
      &lt;/g:each&gt;
  &lt;/g:form&gt;
  </code></pre>
  
  <p>How can I do this without JavaScript?  (Can I add a param to the URL, in addition to the posted params?  Or, some kind of multiplex in the mapping?)</p>
  
  <p>The defaultAction mapping is:</p>
  
  <pre><code>    name defaultAction: "/$controller/$id"{     // stable URL for payments regardless of current status (editable or not)
          constraints {
              id(matches: /\d+/)      // since our action names don't start with a digit but many domain ids do
          }
      }
  </code></pre>