I am trying to clone a feildset then submit the contents of inputs and selects using serialize. It is working properly however select doesn't keep its value. I have tried several ...
You can see what I am trying to do in this jsfiddle: http://jsfiddle.net/pV6x5/16/
The original set of three dropdowns are using javascript to generate what options are available in the ...
Here is the recreation of my problem http://jsfiddle.net/WsFyV/7/
Select any option from the first one. and then click on add.
The select element is cloned but with the value selected in ...
Hi, I discovered recently that for some reason when you clone a form the select values aren't copied over. It seems to be something a few people run into so I came up with this function that would work for select values. [code]function cloneForm(id, withEvents) { var clone = $(#'+id).clone(withEvents); var selvals = []; $(#'+id+
Hi,I had an issue with the clone() function in that it wasn't copyingover select values. I've added this function to my pagefunction cloneForm(id, withEvents){ var clone = $('#'+id).clone(withEvents); var selvals = []; $('#'+id+" select").each(function() { selvals.push($(this).val()); }); clone.find("select").each(function() { $(this).val(selvals.shift()); }); return clone;}which will clone the values as well. I'm a relative Jquery newbie so Iimagine there is a better way ...