How to disabled a custom background when form is not visible in edit mode