Datatable Change or remove search box label text
Datatable is a jQuery plugin which converts a simple html table to a dynamic table with advance functionality like searching , sorting, pagination etc.
By default datatable show a search box to filter records based on the column values that match with the search input box value and its have a label with "Search" text.
So today we will learn how to remove datatable search input box label or change text to any text.
1. Remove/Delete Text of datatable search box label
To remove "Search" text from label , you need to pass language parameter with datatable initialization like below code.
Example Code:
var table = $('#datatableId').DataTable( {
language: { search: "" },
});
2. Change/Modify Text of datatable search box label
To modify text or replace with custom text you need to pass value of language.search object to your text like below code.
Example Code:
language: { search: "Enter User ID" },
});
Related Links:
Data table add date range filter
Data table disable sorting for few column
Comments
Post a Comment