You are viewing limited content. For full access, please sign in.

Question

Question

How to hide the delete option in a table

asked on July 21, 2021

I would like to remove the delete option (X) from a table. 

0 0

Replies

replied on July 21, 2021

Add CSS:

.action a.cf-table-delete
{
  display:none !important;
}

This will tell all cf-table-delete links to not display. You need the add the !important  tag because when the page re-draws if another row is added it'll recreate the table with inline styles which you need to ensure don't overwrite your style setting.

You can also do the same for a collection using this:

a.cf-collection-delete
{
  display:none !important;  
}

 

1 0
replied on July 21, 2021

You can also add a CSS tag to a particular table and set the CSS to only affect that table in case you need to have one table with the close links and one table without on the same page.

  

0 0
replied on July 21, 2021

Thanks! I think I am starting to figure this out. F12 in the browser then playing with the attributes really helps. Coming out here looking for solutions is great but it would be nice to learn to figure out the solutions myself. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.