Ok, so I have a jquery form that has a few different fieldsets. I use jquery to switch in between from each one and eventually it leads to a submit button. Can someone edit my jfiddle or provide me code on how I can submit this data via javascript, jquery, ajax. http://jsfiddle.net/y93sL15t/
$(".submit").click(function(){
return false;
})
Theres an example of part. Please go to jfiddle to see the whole thing
Theres a link to all of my code. I have the submit button function ready, I just need someone to help me fill it so I can send the info from the form, to an email address. Please provide full code, no code that is like Function() "put code here". Thanks
You can use the .serialize()
helper (see doc) to transform your form
inputs to a string
and any Ajax method like $.post(…)
:
$(".submit").click(function() {
$.post(url, $(this).serialize(), function(data, status, jqXhr) {
});
return false;
})
Inside submit click function, before return false, you can write submit the form like this:
// works as "real" form submit using form name fields
$('#msform').submit();