Section 8. A moderator shall be elected by ballot at the annual town meeting when his term of office expires, for the term of one or three years, and shall serve as moderator of all town meetings, except as otherwise provided by law, until a successor is elected and qualified. Nominations for and election of a moderator shall be as in the case of other elective town officers, and any vacancy in the office may be filled by the town meeting members at a meeting held for that purpose. If a moderator is absent, a moderator pro tempore may be elected by the town meeting members.