Is there a way to clone form field values in jQuery or javascript?

ran into the same problem, simple solution:

// touch all input values
$('input:text').each(function() {
    $(this).attr('value', $(this).val());
});

var clones = $('input:text').clone();

the trick is that this will change the actual ‘value’ attribute in the DOM tree, otherwise the data you enter ‘on-the-fly’ only exists in the DOM ‘state’

Leave a Comment