Is there any way to hide the Save, Delete, etc.. buttons in dbFront?

0 votes

By default dbFront creates four buttons:

  • Save Changes
  • Delete Entry
  • Create New
  • Create Copy

How can you hide those buttons?

in Customization by (6.9k points)

1 Answer

0 votes
Best answer

The visibility of those buttons is actually determined by the table & row security.

Control Visibility using Row Security

For more details see: Table Security​​

  • If the connection has no select access, the table will be hidden.
  • If the connection has no delete access, the delete button will be removed.
  • If the connection has no insert access, the "Create New", "Create Copy" buttons will be removed.
  • If the connection has no update access, the "Save" button will be removed.

Another option is to add an expression in the "Row Security" tab such as "0=1​" for the functionality that you want to disable.

For more details on the row security see: Row Security

Control Visibility with CSS

One additional option is to use CSS to hide specific buttons. This is not a secure solution but it can be appropriate if for example you want to remove the 'Create Copy' button while leaving the 'Create New' button visible.

To hide the 'Create Copy' button in all areas of dbFront, you would add the custom CSS to a custom CSS file.

button[action=rowInsertCopy] { display: none; }

For directions on where to add your custom CSS see: Custom CSS Files

by (63.8k points)
edited by
Is there any way to keep "Create New" but hide "Create Copy"?
I updated this answer with directions for using CSS to hide the 'Create Copy" button.
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
Powered by Question2Answer