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.
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.