I believe the above post is giving you half the answer. The second part would be to give the success or error class an interaction with a “Load” trigger. Then use the following settings:
Apply this interaction to your success or error div. Whichever you are trying to make disappear.
You probably don’t target your div through Affect different element(s). But I did since I was testing another option.