A voting app for simulated Student Elections

I have a function prepared for the rooms, where the voting station can be open and closed by the committee, upon providing a pre-shared PIN (in Schools table).

Security hangs on the validation of voter codes. The point of the app is to let all holders of valid voter codes to vote, where voter codes are disbursed by a live committee in a physical room. e: from the app’s POV, the vote should be always anonymous.

e: I reckon security would be improved by storing selected checkboxes into Global variables instead of the Ballot table, and have a server function collect the Global variables at end of the vote sequence into the Votes table. In this way, Forms objects wouldn’t use write access to tables at all. Please correct me if wrong.