Avatar

Disabling adding table rows in kintone

Heather

I've inherited some customizations in our Kintone system that seemed to have disabled the adding of table rows in the table feature of an app.

I'm having some trouble finding the code and wanted to know if anyone knew what it might look like so I could enable the rows again. 

Follow 3 followers
1

3 comments

Avatar
Yuzo Arai 2 votes

Hello Heather,

This is one of the examples of how to disable adding/deleting table rows in Kintone. The key is that it needs to utilize DOM manipulation to hide the button, so it should always have "subtable-operation-gaia" in the script to do something related to the table.

(function() {
"use strict";
kintone.events.on(['app.record.create.show','app.record.edit.show'], function(event) {
[].forEach.call(document.getElementsByClassName("subtable-operation-gaia"), function(button){
button.style.display = 'none';
});
});
})();

I hope this helps

2
Comment actions Permalink