1. Primary Election
If there are no names placed on the primary ballot by timely submission of an appropriate nomination petition, the ballot remains blank and a write-in is the only way to secure the party nomination.
To secure a party nomination by write-in at the primary (and to be placed on the general election ballot) , a candidate must receive a minimum of 10 write-in votes.
This would mean a candidate would need at least 10 Democrat write-ins on the Democrat ballot to get the Democratic nomination, and at least 10 Republican write-ins on the Republican ballot to get the Republican nomination.
2. Write-in Mechanics
Formerly, with paper or mechanical voting machines, there was a line where a write-in name would actually be "written" in. Under current practice with electronic voting machines, the process is that a "write-in" touch-screen button is visible in each of the offices listed for election. When that button is selected, a blank appears along with a touchscreen QWERTY keyboard and the write-in is accomplished by typing the name in.
If people intend to pursue a write-in effort, it is IMPERATIVE that the name be spelled out exactly , and exactly the same in each case. Including first and last name, middle initial, etc. A single letter of difference causes the write-in to be treated as a separate vote for a separate person. There is no accumulation of even obvious spelling errors, and no after-tally correction available. T. Jones, Tom Jones, Thomas J. Jones, and T.J. Jones would each be treated as a separate candidate and would not tally towards the 10 votes required to secure nomination at the primary. You can hand out cards or flyers with your name as it should appear on the ballot.
2. General Election
If no one gets a nomination by write-in in the primary (no one receives at least 10 write-in votes,) leaving the nomination empty, the party committee processes do NOT operate to designate a nominee whose name would appear on the general election ballot. Those party processes operate only when a vacancy in office arises after the primary, or if there is a party nominee but that nominee dies or something.
Thus the only avenue available for the general is likewise the write-in approach.
At the general, even if there are names on the ballot, a the write-in can still emerge victorious if he/she has the highest # of votes. BUT NOTE CAREFULLY a write-in can not be cast, and will not be counted for a person whose name DOES appear on the ballot for the particular office.
An interesting distinction is that while at least 10 write-ins are required in the primary to secure nomination and placement on the general ballot as a party nominee, only one (1) write-in would be necessary to win at the general, if that one write-in is the only vote cast for the office. An unlikely occurrence, but mathematically and legally possible. The point is that even a nominated candidate could win a general with one (1) vote if it were the only vote cast, and the same holds for the write-in.