Template:Primary election box

From Ballotpedia
Jump to: navigation, search
{{{Chamber}}}, {{{year}}}
Candidate Vote % Votes
Total Votes 0
[edit] Template-info.png Template documentation

This is a usage page for the {{Primary election box}}.

The election box template is to be used for primary elections only. For the general election box, see {{Election box/doc}}

There are two main items that compute automatically:

  • Total votes
  • Vote %

If the parameters are appropriately filled in, then those pieces of information will be entered automatically by the template.


Here is the basic code to copy and fill in:

{{Primary election box YEAR
|winner1 =
|Inc1 = 
|candidate2 = 
|votes1 = 
|votes2 = 

There are as many as 30 candidates that can be added to an election box. Quite simply, there are two parameters needed per candidate:

  1. candidate1
  2. votes1

For each subsequent candidate, it would change to:

  1. candidate2
  2. votes2


  1. candidate3
  2. votes3


If the candidate is the winner, then substitute: winner3 for candidate3

Other important notes

  • The winner should always go first, with subsequent candidates in order based on number of votes.
  • If a candidate is an incumbent, simply type "Inc3=Y" and alter the "3" based on which candidate it is.
So if candidate5 is the incumbent, then "Inc5=Y"
  • If when you build the table you want to make it collapsed from the start, enter "Collapse=Yes"

Here is the code with explanations.

  • For blanket primaries, adding "Party1=" will alter the box to allow for party descriptions. It is important that every candidate is given "ParyX=".
{{Primary election box YEAR
Chamber= The title of the election, such as "California State Assembly, District 6 Democratic Primary"
winner1 = Name of the winner
Inc1 = If the candidate is an incumbent, put "Y"
candidate2 = Name of a candidate
votes1 = Number of votes for candidate/winner 1. should be entered without commas, like "230424"
votes2 = Number of votes for candidate/winner 2. should be entered without commas, like "230424"

Here is an example implemented:

{{Primary election box 2008
|Chamber=Republic of the Moon Democratic Primary, California
|winner1 = E Person 1
|votes1 = 800
|Inc1 = Y
|candidate2 = E Person 2
|votes2 = 600
Republic of the Moon Democratic Primary, California, 2008
Candidate Vote % Votes
Green check mark transparent.pngE Person 1 Incumbent 57.1% 800
E Person 2 42.9% 600
Total Votes 1,400

Here is the code for a box with four candidates.

{{Primary election box 2006
|Chamber=A Republican Primary Election
|winner1 = C Person 1
|Inc3 = Y
|winner2= C Person 2
|candidate3 = C Person 3
|candidate4 = C Person 4
|votes1 = 1500
|votes2 = 1150
|votes3 = 900
|votes4 = 800
A Republican Primary Election, 2006
Candidate Vote % Votes
Green check mark transparent.pngC Person 1 34.5% 1,500
Green check mark transparent.pngC Person 2 26.4% 1,150
C Person 3 Incumbent 20.7% 900
C Person 4 18.4% 800
Total Votes 4,350