How can I serialize form with ajaxForm() function

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.

  1. $(document).on("submit","#newcandidate", function() {
  2.       var options = {
  3.       url: 'index.php',
  4.       beforeSend: function() {},
  5.       beforeSubmit: function(arr, $form, options) {
  6.       alert(JSON.stringify(arr));
  7. },
  8.       uploadProgress: function(event, position, total, percentComplete) {},
  9.       success: function(resp) {},
  10.       complete: function() {},
  11.       error: function(request, error) {}
  12. };
  13. $("#newcandidate").ajaxSubmit(options);
  14. });