How to hide space elements?

I use kintone.app.record.getSpaceElement().style.display = “none” to hide but it is still there. How to hide the space element so that it won’t be shown on page?

     kintone.app.record.getSpaceElement(‘space_for_create_button’).disabled = true;

 

kintone.app.record.getSpaceElement(‘space_for_update_button’).disabled = true;

      kintone.app.record.getSpaceElement(‘space_for_create_button’).style.display = “none”;

        kintone.app.record.getSpaceElement(‘space_for_update_button’).style.display = “none”;

Hi annaylee,

 

The parent element of the space field has a different div element. The following should help you.

 

kintone.app.record.getSpaceElement().parentNode.style.display = "none";

 

Hopefully, this helps.