How can I clone the form ( address input) ? not working
<p>How can I clone the form ( address input) ? not working
how to fix this problem
I want to do in such a way as when the user deletes the input and then add it, it should be an active input again. <a href="https://jsfiddle.net/joio/95o0wyfy/29" rel="nofollow">https://jsfiddle.net/joio/95o0wyfy/29</a></p>

<pre><code>$('.add_input').eq(0).click(function() {
            form_a++;
            var formhtml = $('#divform_a .form').eq(0).html().toString();
            formhtml = formhtml.replace(/form_a/g, 'form_item'+form_a);
            $('#divform_a').eq(0).append('&lt;div class="form"&gt;' + formhtml + '&lt;/div&gt;');
                    focus_map_location = jQuery('#divform_a .form:last .map_location');

            $("#divform_a .form:last .address").removeAttr('id');
            address_form = $("#address").parent();
            $("#address").clone(true).prependTo(address_form).removeAttr('id');
            address_name = $("#divform_a .form:last .address").attr('name');
            $("#divform_a .form:last .address").remove();
            $("#address").prependTo($("#divform_a .form:last")).attr('name',address_name).val('');
        });
</code></pre>