0

Hide the Wrench

Is there a script that can be added in a formula that will hide the Wrench?  Similar to the Trash, Copy and other icons top right.

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Sean
    • Sean
    • 1 mth ago
    • Reported - view

    You can with this,

    html("
        <style>
            .hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:none;}
        </style>
    ")
    

    but it will only work when the Form where the Formula field is is open. You can put this in Trigger after open,

    dialog("Hide Wrench", html("<script>
        var styleSheet = document.styleSheets[2];
        styleSheet.insertRule('.hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:none;}');
        var interval = setInterval(() => {
            var bt = document.querySelector('.nx-alert .nx-button-text');
            if (bt) {
                bt.click();
                clearInterval(interval);
            }
        });
    </script>"), ["close"])
    

    but then you'll either have to edit the database file manually to to make Admin button display again or set up a way to show the Admin button in a Formula field which kind of defeats the purpose unless you hide it.

    Like
    • Sean
    • Sean
    • 1 mth ago
    • Reported - view

    If you use the Trigger after open version you can put this in a Formula field and if it isn't hidden and the Form is open it will show the wrench.

    html("
        <style>
            .hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:inline;}
        </style>
    ")
    
    Like
  • Thanks all!!

    Like
  • Additional related question:

    can you hide the calendar button?

    Like
      • Sean
      • Sean
      • 1 mth ago
      • Reported - view

      Michael Riley Yes, this can be done.

      This thread has that info. You don't need to use multiple dialogs if you have more than one rule. Just add stylesheet.insertrule() to any other rules that exist.

      Like
Like Follow
  • 1 mth agoLast active
  • 5Replies
  • 87Views
  • 4 Following