Generally speaking, “sore loser laws” (election laws that say someone who failed to be nominated in a party primary, cannot then be independent candidates in the general election) don’t apply to presidential candidates.
We know this, because of precedent. John B. Anderson ran in two-thirds of the Republican presidential primaries in 1980. On April 23, he withdrew from the race for the Republican nomination (since it was obvious Ronald Reagan was going to be the nominee) and declared as an independent candidate. He got on the ballot in all 50 states and D.C.
Other individuals who ran in presidential primaries, and then got on the ballot as an independent presidential candidate, over the years, have been Theodore Roosevelt in 1912, Robert La Follette in 1924, David Duke in 1988, and Lyndon LaRouche 1984 through 1992. Thanks to Steve Rankin for reminding me about Roosevelt.
When one combines the precedents set by Anderson and these others, one finds a precedent that sore losers do not apply to presidential candidates, in almost all states. The exceptions are Texas, Ohio, Mississippi and South Dakota (where elections officials have said the sore loser laws do apply), and Pennsylvania (where the law has never been tested).
Even in the four states that say their “sore loser” laws apply to presidential candidates, there are sound reasons why a court might disagree. The true candidates in November are candidates for presidential elector. Presidential candidates’ names appear on the ballot in November, but they are not listed on the ballot in their capacity as candidates, because Article II doesn’t permit the people to vote directly for president. Instead, the voters vote for candidates for presidential elector. Presidential candidates’ names are on the November ballot as labels for competing slates of presidential electors, and not as candidates per se.
Therefore, if a slate of independent or new party electors themselves qualify for the November ballot, and they say they will vote for a “sore loser” in the electoral college (should they win in November), a state would not have authority to refuse to print the name of the person they say they intend to vote for. Presidential electors are free to vote for anyone for president in December, in the electoral college, who meets the constitutional qualifications to hold the office. We know this is true, because Congress has always counted the votes in the electoral college for every elector. The only exception was in 1872, when 3 electors voted in the electoral college for Horace Greeley, who had died in late November 1872. Congress decided that electoral college votes for a deceased person are invalid. But all other electoral votes have always been counted by Congress, no matter whom the elector voted for. Thus Congress counted the one electoral vote for president received by John Edwards in 2004, from Minnesota, even though it was believed that the anonymous presidential elector who voted for John Edwards for president in 2004 had merely made a clerical error. In Minnesota, the electors vote secretly, and the Democratic elector who voted for John Edwards never stepped forward to identify himself or herself and explain why he or she had voted for John Edwards.
Since electors can vote for anyone who meets the constitutional qualifications to be president (age 35, natural-born citizen), it would seem logical that a state has no authority to forbid ballot-listed slates of electors from identifying on the November ballot the name of the person the electors intend to vote for, for president, whether that individual is a “sore loser” or not.