Use the submit() function on the form to create a callback. If the function returns true, the form will be submitted; if false, the form will not post.
$('#theForm').submit(function() {
$("#field1").val(newValue1);
$("#field2").val(newValue2);
$(this).append(newFormField);
return true;
});
etc.