How can I serialize form with ajaxForm() function
I use malsup jquery form plugin for my upload processes. But, I have an upload input with more standart html inputs. (
http://jquery.malsup.com/form/#getting-started) jQuery form plugin working properly for standart form post processes. I want to use form serialize method with ajaxForm() or ajaxSubmit() function.
- $(document).on("submit","#newcandidate", function() {
- var options = {
- url: 'index.php',
- beforeSend: function() {},
- beforeSubmit: function(arr, $form, options) {
- alert(JSON.stringify(arr));
- },
- uploadProgress: function(event, position, total, percentComplete) {},
- success: function(resp) {},
- complete: function() {},
- error: function(request, error) {}
- };
- $("#newcandidate").ajaxSubmit(options);
- });