The petition, whenexecuted and acknowledged as prescribed in this part 9, shall be filed as follows: With the secretary of state if it is for an office that is voted on by the electors of the entire state or of a congressional district or for the offices of members of the general assembly or district attorney or a district office of state concern; with the county clerk and recorder if it is for a county office; and with the designated election official if it is for a nonpartisan local election.