Does a unit have to be hidden as it's charging to get the bonus or it doesn't matter as long as a unit's hidden once?

I always hide my toops the best I can but I never understand to put this morale bonus into effect or whatever.