No person shall become a candidate for election under the provisions of the act, approved the third day of June, one thousand nine hundred thirty-seven (Pamphlet Laws 1333), known as the "Pennsylvania Election Code," and its amendments, to any State, district, county, or local public office whatsoever in this Commonwealth, unless he shall file with his nomination petition, nomination paper or nomination certificate a statement, under oath or affirmation, that he is not a subversive person, as defined in this act, which statement shall contain notice that it is subject to the penalties of perjury. No nomination petition, nomination paper or nomination certificate shall be received for filing by any county board of elections or by the Secretary of the Commonwealth unless accompanied by the statement required hereby, nor shall the name of any person who has failed or refused to make the statement be printed on any ballot or ballot label to be used at any general, municipal, primary, or special election.
The statement required by this section shall be filed by any person nominated at a primary election as a write-in candidate within sixty (60) days after the primary election in which he is nominated, and shall be filed by any person not previously nominated, who is elected as a write-in candidate at a general, municipal or special election, prior to being sworn into the office to which he is elected.
65 P.S. § 224