jQuery - Adding hidden input to form on submit
<p>I'm looking for a way to insert a hidden input on submitting for 'Yes' in my jquery code below.</p>

<p>How do I insert this:</p>

<pre><code>&lt;input type="hidden" name="token" value="1"&gt;
</code></pre>

<p>From this:</p>

<pre><code>$(function() {
    $( "#dialog" ).dialog({
        autoOpen: false,
        modal: true,
        buttons: {
            "Yes": function() {
                $( '#form' ).submit();
            },
            "No": function() {
                $( '#form' ).submit();
            },
            Cancel: function() {
                $( this ).dialog( "close" );
            }
        }
    });
});
</code></pre>
