Js hide Edit button on Display

Forums Classic DFFS Js hide Edit button on Display

Viewing 2 reply threads
  • Author
    • #28566

      I’ve found similar topics but nothing on hiding the edit button, which is proving trickier since it appears after dffs_ready is done. I need to hide and show it conditionally and I prefer to code my conditions, so while the rule method works I’d like to avoid it if I can. The edit button in the ribbon is already handled.

      Thank you for your time.

    • #28578
      Alexander Bautz

      The edit button is added to the bottom of the form after 1500ms (because there is some functions running before it is drawn) – try deferring your custom code for 1500ms (or maybe a bit more) to see if it helps.


    • #28579

      A setTimeout worked, thanks!

      For anyone else looking for this solution,

      setTimeout(function() { document.querySelector("#dffs_editItemBtn").style.display="none"; }, 1050);

      Any less than 1050 the button flickers on the screen and any more this code runs before the edit button is added

Viewing 2 reply threads
  • You must be logged in to reply to this topic.