0

How to remove the duplicate button in a form view?

In invoice form I program a automatic number but if I use the duplicate button I have identical invoice number. It is possible to gray out the duplicate number?  Do I have to use role?

13 replies

null
    • Sean
    • 4 yrs ago
    • Reported - view

    You can hide the duplicate button using a formula field and then hide the formula field. Here's the code for trash, duplicate and add...

     

    html("
    <style>
    .hud-menu-button.menu-icon.menu-icon-trash{display: none;}
    .hud-menu-button.menu-icon.menu-icon-duplicate{display: none;}
    .hud-menu-button.menu-icon.menu-icon-add{display: none;}
    </style>
    ")

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    You are the greatest. 

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    That doesn't work with multiple table and come back normaly with the duplicate button.

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Yes, the hidden formula field should be on every form you use where the buttons must be hidden. You could also use a global function to prevent repeatedly typing the script and call that function on your forms in a hidden formula field.

    Steven

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    Steven I try all that + a trigger after open in options menu and after a time the duplicata button came back. 

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    a function like that

    function rduplicatbutton(db: text)do
    let db :=html("
    <style>
    .hud-menu-button.menu-icon.menu-icon-duplicate{display: none;}
    </style>
    ")
    end

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    when I hide the formula field with display field only if (null) the button come back at the next refresh but if I leave the field without changing the statut "display field only if =null it work...

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    I find a way that work perfectly but I could use display field only if =null I have to use a differnet field for condition

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Sorry my mistake, don't hide it, In stead You can style the formula field in a way it becomes invisible... (Background & text rgb 238 and hidden label)

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Here's an example of an invisible formula field to hide the close form X (black background) :

    https://ninoxdb.de/en/forum/use-cases-5abd0b9c4da2d77b6ebfa395/simple-log-in-system-with-datetime-registration.-5e11d00509d132371a594f5c

    Steven

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    and for the printer it is

    .hud-menu-button.menu-icon.menu-icon-print{display: none;}

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    and for the printer it is

    .hud-menu-button.menu-icon.menu-icon-print{display: none;}

    • Cegep de jonquiere
    • James_Deraps.1
    • 4 yrs ago
    • Reported - view

    Thank you steven everthing work great

Content aside

  • 4 yrs agoLast active
  • 13Replies
  • 2843Views