You are elected to a position or office: "He was elected to the board of trustees". Sometimes you see "for" used in this sense ("He was elected for parliament"), but to me this seems sloppy. You are elected for a time period: "He was elected for five years".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.