translate object this.id into $(#elementID)

translate object this.id into $(#elementID)

I have a set of working functions on a form that I inherited from a previous developer. The current iteration worked until I added a handful of check boxes to the form, then it stopped working correctly as follows.

I have a step form with a save button that onclick calls:
  1. function submitMainForm()
    {
       $('#step1form, #step2form, #step3form').each(
        function(){
            $('#save').append(getNamesAndValues($(this)));
            });
        alert('Form Complete');
        $('#save').submit(); // submit the created form
    }








which calls
  1. function getNamesAndValues(jQObj)
    {
        var divContainer = $(document.createElement('div'));
        var inputElement = $(document.createElement('input'));
        inputElement.attr('type', 'hidden');
        jQObj.each( function (){
            if (this.id){
                $(this).find('.FormLine').children().each(function(){
                        if (this.id && this.value){
                            inputElement.attr('name',this.id);
                            inputElement.attr('id',this.id);
                            inputElement.attr('value',this.value);
                            divContainer[0].appendChild(inputElement[0]);
                            inputElement = $(document.createElement('input'));
                            inputElement.attr('type','hidden');
                        }
                    }
                );
            }       
        });
        return divContainer.html();
    }




















the purpose of which is to search through a multi-step form and grab any filled out fields, create new html elements and stuff them into a hidden form to process only the fields that have been filled out at any given point in the form and submit it. It creates "save your progress" functionality.

It worked perfectly, until the addition of the check boxes, now it adds them to the hidden form whether or not they were checked. This is due to the fact that they pass the logic if (this.id && this.value), as the check boxes have an id and a value regardless of whether they are checked.  So I know I need to check if the element being evaluated is a check box and if it is filled out. 

I know that the code to do that is:
  1. $('#elementID').is("checkbox") //returns true if element is a check box
    $('#elementID')..is('checked')) //returns true if it is checked
However in my getNamesAndValues function I have access to the elementsID through this.id but I can't use this.is("checkbox"), I also tried $(this.id).is("checkbox") to no avail.

So my question is how can I use what I have this.id to accomplish $('#elementID').is("checkbox") ?

I have searched and searched and I am at a loss, thanks for any help in advance.