Hide search on datatable that is on an editor form
Hide search on datatable that is on an editor form

Below is my editor definition which includes a datatable to show residents under an address. Is it possible to hide the search field? you can set I've tried multiple things.
let maintable;
var addresseditor = new DataTable.Editor( {
ajax: 'php/Addresses_Address_DT.php',
table: '#Addresses',
idSrc: "Addresses.AddressAID",
searching: false,
fields: [
{
"label": "Address Notes:",
"name": "Addresses.addressnotes",
"type": "textarea"
},
{
label: 'Res Pick',
name: 'FullNameParty',
type: 'tags',
limit: 6
},
{
label: 'Residents:',
name: 'Addresses.AddressAID',
type: 'datatable',
dom: 'lrtip',
submit: false,
searching: false,
paging: false,
info: false,
layout: {
topStart: null
} ,
select:false,
config: {
ajax: {
url: 'php/Addresses_Residents_Nested_DT.php',
type: 'POST',
searching: false,
paging: false,
info: false,
select:false,
layout: {
topStart: null
} ,
data: function (d) {
//if (DataTable.isDataTable('#Addresses')) {
// debugger;
if (maintable) {
var selected = maintable.row({ selected: true });
if (selected.any()) {
d.AddressAID = selected.data().Addresses.AddressAID;
}
}
//}
}
},
columns: [
{ title: 'FullName', data: 'FullNameParty' },
{ title: 'Spoken', data: 'Spoken_With' },
{ title: 'Confident', data: 'Confident' },
{ title: 'J FU', data: 'Jordan_Followup' },
{ title: 'Notes', data: 'ResidentNotes' },
{ title: 'Ignore', data: 'Ignore' },
{ title: 'Gender', data: 'Gender' },
{ title: 'DOB', data: 'Gender' },
{ title: 'Phone', data: 'Phone' },
{ title: 'Email', data: 'email' }
]
} }
]
// fields: [
}
);
This question has an accepted answers - jump to answer
Answers
Add
searching: false
into yourconfig
object for the DataTable. Seesearching
.Allan
I already have that in the code above and attaching a screenshot with it circled.

To clarify, the main datatable has searching enabled. The datatable that is opened beneath the editor is where i want to hide searching and I tried adding searching: false to a few places
Put it inside the
config
object, at the same level asajax
andlayout
in the above screenshot.Allan
Thank you