RICHMOND, Va.—Hours before Donald Trump took the stage at a rally here, clipboard-toting volunteers strode along the line outside Richmond International Raceway, gathering signatures from attendees clad in American flag apparel and “Make America Great Again” hats.

Their mission: to ensure that Mr. Trump’s name appears on the March 1 Virginia primary ballot.