LoginSignup
1
0

More than 1 year has passed since last update.

【kintone カスタマイズ】 印刷画面の全ての罫線を非表示にする

Last updated at Posted at 2022-03-31

印刷画面の全ての罫線を非表示にする

kintoneの罫線は「フィールドコード」を持ち合わせていないため、DOM操作による非表示が必要になります。 下記のコードではラベルに付与されるクラス名からラベル要素を全て取得し、その後非表示する処理を行っています。

js
(function () {
    "use strict";
    // 印刷画面が表示されたときに動作
    kintone.events.on('app.record.print.show', function(event) {
        //罫線の非表示('control-hr-field-gaia ')
        let hrs = document.getElementsByClassName('control-hr-field-gaia ');
        for (let i = 0; i < hrs.length; i++) {
            let hr = hrs[i];
            let parent = hr.parentNode;
            hr.style.display = 'none';
            parent.style.display = 'none';
        }
    });
})();

ラベルの非表示はこちらをご覧ください

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0