You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be very useful to have the ability to set the name attribute of inputs in filters (I am using Tablesorter with ajax calls). I think this could be set like this (similar to initialization of values):
<th data-name='my_name_attribute'>Field 1</th>
I just made some tests in jquery.tablesorter.widgets.js, the code below does the job but that is probably not the cleanest way to achieve it.
buildFilter = $( '<input type="search">' ).appendTo( $filter );
/* My modification is below: */
if ($(table).find('thead tr:first th').eq(column).data('name') != undefined) {
buildFilter.attr('name', $(table).find('thead tr:first th').eq(column).data('name'));
}
Thanks
The text was updated successfully, but these errors were encountered:
You can create your own custom filter row (demo), or add the name attribute within a callback bound to the filterInit event:
Custom HTML Row:
<trclass="tablesorter-ignoreRow filters"><!-- the `data-column` attribute in the input is mandatory --><td><inputname="foo" type="search" data-column="0" /></td><td><inputname="bar" type="search" data-column="1" /></td>
...
</tr>
Hello,
I think it would be very useful to have the ability to set the name attribute of inputs in filters (I am using Tablesorter with ajax calls). I think this could be set like this (similar to initialization of values):
<th data-name='my_name_attribute'>Field 1</th>
I just made some tests in jquery.tablesorter.widgets.js, the code below does the job but that is probably not the cleanest way to achieve it.
Thanks
The text was updated successfully, but these errors were encountered: