I have worked at the polls a few times here in Tennessee. When a voter prepares to fill out the application for ballot, we ask “In which primary do you wish to vote?”, and there is a place for the voter to mark his or her choice. Once the primary has been selected, a machine operator prints an access code for the voter to take into the booth, and it brings up the primary that was selected.
Thanks. That is the process I was envisioning. You have to tell the poll workers which party you wish to vote in.