0

Hide the trash, duplicate and add buttons globally

Hello everyone, 

 

Is there a way to hide the trash, duplicate and add buttons globally?

I find I have to add the formula to every separator of every tab in every form...

6 replies

null
    • Fred
    • 9 days ago
    • Reported - view

    Another way to work around this is to uses dashboards/pages to create a UI for your users to use. That way you only need to hide it tables that they actually open.

      • fmedeiros
      • 8 days ago
      • Reported - view

      Hi  

      Thank you for your reply. I'm actually the only one using the database. I use it as a report database for electrical inspections. I'm trying to solve the problem that, in the mobile app, these buttons (delete, duplicate, etc.) are actually displayed below "back" button on the android UI overlay. So, accidental presses occur very often when trying to navigate in the database. The reports have many fields, that is why I use several separators and apparently I have to use the hide formula for every separator and try to hide it without using the null script in the hide if field.

      • Fred
      • 8 days ago
      • Reported - view

      For my DB, I am the only user, but as I started using dashboards I find they are faster and easier to enter/adjust my data than going directly.

      • fmedeiros
      • 7 days ago
      • Reported - view

       Thanks again. I have a main dashboard, but it was a custom dashboard that I have created. Maybe I didn't understand what you actually meant by using the dashboards. Is there a new tool specifically for creating dashboards that doesn't show those buttons by default?

      Either way, Sean's script in the Trigger after open worked very well.

      Thank you all!

      Regards

    • Sean
    • 8 days ago
    • Reported - view

    The following works in the iPhone app. I don't have an Android phone so I can't test for that.

    dialog("Custom CSS", html("
        <script>
            const customCSS = '.hud-menu-button.i-32-24.i-light-grey.i-setting-print{display:none;}.hud-menu-button.i-32-24.i-light-grey.i-setting-trash{display:none;}.hud-menu-button.i-32-24.i-light-grey.i-setting-copy{display:none;}.hud-menu-button.i-32-24.i-light-grey.i-setting-add{display:none;}';
            const customSheet = new CSSStyleSheet();
            customSheet.replaceSync(customCSS);
            document.adoptedStyleSheets = [customSheet];
    
            var interval = setInterval(() => {
                var btn = document.querySelector('.nx-alert .nx-button-text');
                if (btn) {
                    btn.click();
                    clearInterval(interval);
                }
            });
        </script>
    "), ["close"])

    Where to put the script:

    1. Open your database
    2. Select the wrench icon
    3. Select the 4-square icon
    4. Select options
    5. Select Trigger after open and paste the script in the text area
    6. Save the changes
    7. Exit your database since the script only runs once after the database is initially opened
    8. Open your database
      • fmedeiros
      • 7 days ago
      • Reported - view

       Thank you! This worked perfectly with Android. SOLVED

      Best wishes

Content aside

  • Status Answered
  • 7 days agoLast active
  • 6Replies
  • 59Views
  • 3 Following