Support

Account

Home Forums Front-end Issues Disable duplicate layout button

Solving

Disable duplicate layout button

  • I have 7 different layouts within one Flexible Content and i already set maximum layout to 1 for these layouts. But how can i disable duplicate layout button? I don’t wanna give permission to user for duplicate layouts.

    • Key

    • April 1, 2021 at 8:30 pm

    Hello, did you find a way to remove the duplicate button ? ( It’s easy to “display: none;” in css but I’d like to know if there were a better way )

  • Can can either use CSS to hide the button or you could possibly add custom javascript to remove the button completely.

    
    (function($){
      if (typeof(acf) == 'undefined') {
        return;
      }
      acf.add_action('ready append', function(e){
        $('a.acf-icon.-duplicate').remove();
      });
    })(jQuery);
    
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.