Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

675
Views
Change DataTable Search Label

Been trying to change the Search: to Filter: in my datatable that I created.

I tried this that i found:

$(document).ready(function() {
oTable = $('#datatable-example_filter').dataTable({
  "aaSorting": [[ 10, "desc" ]],
  "bJQueryUI": true,
  "aLengthMenu": [[25, 50, 100, 250, 500, -1], [25, 50, 100, 250, 500, "All"]],
  "sPaginationType": "full_numbers",
  "oLanguage": {
    "sSearch": "Filter: "
  }
});
} ); 

but it is not working, #datatable-example_filter is the name of the id, inside the div that is generated by dataTable

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

The other answer that uses "oLanguage" is using legacy DataTables api. According to DataTables v 1.10+ documentation, the syntax is:

$('#example').dataTable( {
  "language": {
    "search": "Filter records:"
  }
} );
over 4 years ago · Santiago Trujillo Report

0

very easy, just put this parameter when you call data table function:

"oLanguage": {
  "sSearch": "<span>YOUR SEARCH TITLE HERE:</span> _INPUT_" //search
}
over 4 years ago · Santiago Trujillo Report

0

Inside the Datatable Javascript (table = $dataTable.DataTable) add the following code:

language: {
  'search' : '' /*Empty to remove the label*/
}

I left the search empty because I wanted the info to be in the Placeholder

Ps: If you want to add a placeholder put the following code outside the Datatable initialization

$('.dataTables_filter input').attr("placeholder", "Zoeken...");
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!