Editor: How to hide a field in the edit & create forms
Editor: How to hide a field in the edit & create forms
robsimpson
Posts: 36Questions: 8Answers: 1
I see this example in https://editor.datatables.net/reference/api/field().hide():
editor.field( 'account_type' ).hide();
but I don't know where to put this in my code.
I've tried adding 'hide: true' in the editor declaration:
editor = new $.fn.dataTable.Editor( {
ajax: {url: 'http://127.0.0.1:5025/backend', type: 'POST' },
table: '#tablename_v1',
idSrc: 'id',
fields: [
{
"label": "Id:",
"name": "id",
hide: true
},
{...]
but this doesn't work.
How can I do this?
Thanks,
Rob
This question has an accepted answers - jump to answer
Answers
Ah, I've realised you can remove it from the Editor definition. That seems to work!