{hero}

search.placeholder

Since: DataTables 2.0

Placeholder for the input element.

Description

Set the placeholder attribute for the input element that the search feature uses to allow global search in a DataTable.

This option will default to the value given by language.searchPlaceholder, which should generally be preferred over this option as the language strings can be loaded by Ajax and shared for the whole table, but if needed, this option is available to override that.

Type

This option can be given in the following type(s):

Default

Defaults to the language.searchPlaceholder option's value.

Example

Provide placeholder text for the search input:

new DataTable('#myTable', {
	layout: {
		topEnd: {
			search: {
				placeholder: 'Search here'
			}
		}
	}
});

Related

The following options are directly related and may also be useful in your application development.