Hide field in table and form
Hide field in table and form

Hi,
I need some fields from a table to caculate KPIs and show them as fieldInfo, but I don't want to show the fields in the table and in the forms as well.
I only find this both examples "Data shown only in the form" and "Data shown in table only" where you can hide it in the form or the table.
Is the an atribute ála readonly or hide for form fields?
Thanks for any support
Cheers Patrick
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Sorry, but I solved it -> https://editor.datatables.net/reference/field/hidden
Howdy,
If you want to omit fields from showing in the Editor you can simply omit it from the editor instancing.
Example.
If you don't define it in the editor instance it wont load the field in the editor form.
Oh I see and I will try this solution as well.
Thank you very much man
Cheers Patrick
I tried this solution of omitting the field from the editor fields: definition and received the following error:
dataTables.editor.js:2771 Uncaught Unknown field name - itemSize
I'm looking for the same solution - to display the column but hide it from the edit form. Thanks in advance.
Hi bpernikoff,
The most likely cause, without seeing your code, is that the field itemSize really doesn't exist - is it a typo, or has it been removed?
If that's not the cause, please post your code and we can take a look. It might be best to do it in a new forum thread and just link to this one.
Cheers,
Colin
Hi Colin,
Thanks for replying. Here is my code which is only using the in memory table to be used to post the data back to an endpoint.
The table definition: itemSize is a hidden column used as a placeholder so the total for all file sizes can be calculated.
Here is the Editor: I was hoping to omit the itemSize from the fields as per your instruction so that it does not appear on the edit form but doing so throws that error (dataTables.editor.js:2771 Uncaught Unknown field name - itemSize)
Hi again,
Please take a look at second comment in this thread, it points to this page. If you add the
hidden
then that'll sort you out.Cheers,
Colin