I am using the jQuery Form Plugin to submit a form via AJAX. One thing I'd
like to do, is editing the value of a (hidden) input field, right before the
form is sent (or alternatively adding additional POST data in some way
before send). I defined a hidden input field (without a value) in the form
and I tried to change the "value" attribute with jQuery in the "beforeSend"
section of the ajaxForm Options. Unfortunately this doesn't work, the field
still stays empty.

This is the most basic code of what I am trying to do:

var ajaxFormOptions = {  beforeSend: function(){
$("#hidden_input").attr("value","test"); } }; 
$('#form').ajaxForm(ajaxFormOptions); 


How could I implement this functionality?
-- 
View this message in context: 
http://www.nabble.com/Form-Plugin%3A-editing-adding-data-before-send-tp20359407s27240p20359407.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to