Ok, it seems I still need help here.
var ajaxFormOptions = { beforeSerialize: function(){ $("#hidden_input").attr("value","test"); } }; $('#form').ajaxForm(ajaxFormOptions); works fine now :). However, in reality, I don't want to set the value of the input field to an arbitrary value, I actually make another ajax request to receive that value, but for some reason the input field stays empty this way: $(document).ready(function() { var ajaxFormOptions = { beforeSerialize: function(){ $.ajax({ method: "get", url: "ajax.php", data: "", success: function(html){ $("#hidden_input").attr("value",html); } }); }, }; $('#form').ajaxForm(ajaxFormOptions); }); (Note: alerting the html var inside the success function of $.ajax displays the correct value, but the hidden_input field value stays empty on the server.) -- View this message in context: http://www.nabble.com/Form-Plugin%3A-editing-adding-data-before-send-tp20359407s27240p20367050.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.