Why am I unable to serialize a form that I’ve created in a Javascript function

I have to been trying to get serializeArray working for forms that I build when needed inside my main inlineFormFunction call. For whatever reason it does not work, yet it works if I call a real form from inside the function.

serializeArray is not a function 

<a href="javascript:void(0)" 
   onclick="inlineFormFunction.call(this); return false;"
   data-type="POST"
   data-datatype="JSON"
   data-userid="112"
   data-url="/block_user">Block User</a>


function inlineFormFunction() {
    var formData = new FormData();
    var data = $(this).data()
    $.each( data, function(k, v) {
        formData.append(k, v);
    });
    $.ajax({ data: formData.serializeArray(), 
             type: data.type, 
             dataType: data.datatype, 
             url: data.url, 
             processData: false,
             success: function(response) {

             // Do Stuff
             },
             error: function(error) {
                 console.log(error);
             }
    });


 }

but if I create a form and then call that form from the function it works fine.

<a href="javascript:void(0)" 
   onclick="inlineFormFunction.call(this); return false;"
   data-type="POST"
   data-datatype="JSON"
   data-userid="112"
   data-url="/block_user">Block User</a>


<form id="block_user_form" method="POST">
    <input id="userid" name="userid" value="112">
</form>

function inlineFormFunction() {
    var formData = new FormData($('#block_user_form')[0]);
    var data = $(this).data()
    $.ajax({ data: formData.serializeArray(), 
             type: data.type, 
             dataType: data.datatype, 
             url: data.url, 
             processData: false,
             success: function(response) {

             // Do Stuff
             },
             error: function(error) {
                 console.log(error);
             }
    });


 }

thanks –