zachwick / TableCSVExport

jQuery plugin to convert HTML table to CSV
http://zachwick.com/?p=87
42 stars 30 forks source link

Cells with <input> could use .val() instead of being returned empty #12

Open jfilg opened 8 years ago

jfilg commented 8 years ago

In some cases it may be useful to have cells that contain elements appear in the CSV. At the moment these are rendered blank but a quick fix would be to add something along the lines of:

if($(input).val()){
    input = $(input).val();
}

to the formatData function.

rubo77 commented 8 years ago

You could edit the file, test it and create a pull request

jfilg commented 8 years ago

I have a local version with that change in and it works well. I considered issuing a PR but to be very honest I'm not used to contributing and I was not sure what was the proper etiquette!

rubo77 commented 8 years ago

just use the fork button at the top and make your change. this will show you the option to create a PR. that's the etiquette ;)