I had formerly been a teacher. Now I work in Strategic Communications.
Formally is also an adverb. It means something that is official. Officially.
I’m going to a wedding this Friday. My husband and I will both be formally dressed.
If it’s difficult to remember, just think of the root.
Formerly = former
Formally = formal