markmalek / Fixed-Header-Table

jQuery plugin for tables with fixed headers
www.fixedheadertable.com
MIT License
930 stars 542 forks source link

Form inputs in fixed columns #153

Open jmoody47 opened 8 years ago

jmoody47 commented 8 years ago

With a straight clone of the cells in the fixed columns, this presents a problem on form submit if form inputs exist in the fixed columns. The value of the original form input (hidden beneath the clone) is posted.

I was able to get around it with a simple script setting the values before submit, but it would be a nice thing to address in the future.

In case anyone else runs into this, here's the script I used: $(form).submit(function(){ $(selector).each(function(){ val = $(this).val(); name = $(this).attr("name"); if(val !== ""){ $("input[name='" + name +"'").val(val); } }); });