Skip to content

Name attribute of inputs in filter #1499

@pierresh

Description

@pierresh

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.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions