In this situation, "for" appears to be a preposition. " So here the prepositional phrase is "for a family," which functions as a adjective: the linking verb "was" links the subject, "the key to a happy family life," with an adjective in the predicate, which describes it. "
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.