Erase button in single record

28 posts by 5 authors in: Forums > CMS Builder
Last Post: January 7   (RSS)

By MercerDesign - December 8

Is their a way to remove the erase button from the single record section editor, the button that sits next to the Save, Preview and Cancel buttons?

By Deborah - December 8

Yes! When setting up a section editor, you can select the "Advanced" tab at the top of the screen, then check the "Disable Erase" checkbox.

~ Deborah

By MercerDesign - December 8

When I create a single record I don't get an advanced button.

By MercerDesign - December 8

Thank you, yes I was worried about that. Although I am worried about the content being erased too, is there no way of removing the button?

By Deborah - December 8

I am not aware of a way to do that. Perhaps someone else has a suggestion.

~ Deborah

By hans - December 21

Hello, do you still need to resolve this issue?

Hans Marcon
PHP Programmer (In Training)
interactivetools.com

By MercerDesign - January 4

Ideally yes, I'm concerned my client will rease the content by mistake.

By hans - January 4 - edited: January 4

As a warning, you would like to have the option to be able to "erase" a record anyways (in case you do need to). But if you want the option to...

<?php if(isset($_GET['menu']) && $_GET['menu'] === "section_name"): ?>

    <style type="text/css">
      button.btn.btn-primary[name=Erase] {
          display: none;
      }
    </style>

<?php endif; ?>

Replace section_name (keeping the quotes) with the name (of the section where you want the "Erase" button to be hidden), that which can be found via the URL of the single section editor as displayed in the preview below:

https://www.interactivetools.com/forum/forum-posts.php?postNum=2245267&download=name_of_section.png

Hans Marcon
PHP Programmer (In Training)
interactivetools.com
Attachments:

name_of_section.png 20K

By MercerDesign - January 5

Thank you for your reply, where do I put this code?