Trying to set value on hidden parameter on click of submit button in form
<p>Trying to set a parameter on a hidden field on click of submit button.</p>

<pre><code>    $('.delete').on('click', function() {
        $('#id').val('1000');
    });
</code></pre>

<p>This is the hidden field:</p>

<pre><code>    &lt;input type="hidden" name="itemId" id="id" /&gt;
</code></pre>

<p>And this is one of my submit buttons:</p>

<pre><code>    &lt;input type="submit" value="Delete item" class="delete" /&gt;
</code></pre>

<p>However at the server the itemId field is empty.</p>
