The legislative body of any city having ten thousand or more inhabitants may, by resolution, provide for submission to the voters of the question whether the city shall become a charter code city and be governed in accordance with a charter to be adopted by the voters under the provisions of this title. The legislative body must provide for such an election upon receipt of a sufficient petition therefor signed by qualified electors in number equal to not less than ten percent of the votes cast at the last general municipal election therein. The question may be submitted to the voters at the next general municipal election if one is to be held within one hundred and eighty days or at a special election held for that purpose not less than ninety nor more than one hundred and eighty days after the passage of the resolution or the filing of the certificate of sufficiency of the petition. At such election provision shall also be made for the election of fifteen freeholders who, upon a favorable vote on the question, shall constitute the charter commission charged with the duty of framing a charter for submission to the voters. If the vote in favor of adopting a charter receives forty percent or less of the total vote on the question of charter adoption, no new election on the question of charter adoption may be held for a period of two years from the date of the election in which the charter proposal failed.