🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Elections & Ranked Ballots Setup Guide

Updated 13 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. How it differs from other voting tools
  5. Build the ballot
  6. Election settings
  7. The voter roll
  8. Send the ballot links
  9. Logged-in voting
  10. What voters see
  11. How votes are kept secret
  12. How the votes are counted
  13. Results
  14. Paper ballots
  15. Anonymous ballots and the audit report
  16. FAQ
  17. Can an organiser see how a member voted?
  18. What if a member loses their link?
  19. Can I run several elections at once?
  20. Is the result legally valid?
  21. What does uninstalling remove?

Video walkthrough

Gravity Forms Elections & Ranked Ballots Setup Guide: Voter Roll, Ballot Links, IRV & STV Count
Video setup guide: Gravity Forms Elections & Ranked Ballots Watch on YouTube

The Gravity Forms Elections & Ranked Ballots add-on runs member elections on your own WordPress site. Only the members on your voter roll can vote, each of them once, by a personal ballot link or while logged in. Every ballot goes into a secret ballot box, apart from the record that the member has voted, and the add-on counts the result with plurality, approval, instant-runoff or single transferable vote, round by round. This guide covers installing the add-on, building a ballot, the election settings, the voter roll and ballot links, what voters see, how votes are stored and counted, the results, paper ballots and the audit report.

What you need

You need Gravity Forms 2.9 or newer and WordPress 6.5 or newer on PHP 7.4 or newer. Everything runs inside your WordPress site: there is nothing to install on the server and no outside service. Ballot link e-mails are sent by your site the same way as every other Gravity Forms notification, so a working mail setup (for example an SMTP plugin) is all you need for link voting. The add-on makes no outside connection beyond checking gravityextra.com for your licence and plugin updates.

Setting up an election, managing the voter roll and reading the results need the Gravity Forms edit forms capability.

Install and activate

  • Upload the add-on zip in Plugins → Add New → Upload Plugin and activate it.
  • Go to Forms → Settings → Elections, enter your GravityExtra licence key and press Activate License.
  • A new field, Election ballot, appears under Advanced Fields in the form editor, a new tab Elections appears in Form Settings, and the menu item Forms → Elections lists your elections.

Without an active licence, ballots show a short note instead of the voting form, and the voter roll, the ballot links, the results and the downloads are switched off.

How it differs from other voting tools

Gravity Forms already has several ways to collect opinions, and it helps to know which tool fits which job.

  • Our Entry Reviews & Votes add-on lets visitors like or rate entries in public, for example photo contest submissions or ideas. Anyone allowed to see an entry can vote on it, and the counts are visible. It is built for feedback and popularity, not for electing people.
  • Our Survey, Quiz & Poll Tools add-on has a Ranking field and polls with live results. Those are made for surveys and quick polls: there is no voter roll, no secret ballot apart from the voter and no instant-runoff or single transferable vote counting. A ranking collected there is only stored, not counted round by round.
  • The official Gravity Forms Polls add-on runs one-question polls with live results.
  • Elections & Ranked Ballots is for elections: a fixed list of eligible voters, one ballot per voter enforced on the server, a secret ballot box, results hidden until the close and a transparent count with every round and an audit report.

Your organisation decides how its elections work. Your constitution, by-laws or local rules say who may vote, which counting method applies, what quorum is needed and how ties and disputes are settled. The add-on gives you the tools and a count you can check; the organisers remain responsible for running the election under their own rules.

Build the ballot

Create a new form (or use an existing one) and add one Election ballot field for each position: Chair, Treasurer, Board members and so on. The field label is the name of the position. In the field settings choose:

  • Ballot type: Pick one (radio buttons), Pick up to N (approval voting: tick boxes, with a limit) or Rank the candidates (voters put candidates in order of preference).
  • Seats to fill: how many people are elected for this position. A pick-one position always fills one seat. A ranked position with one seat is counted by instant-runoff; with two or more seats by single transferable vote. The field settings show which method applies.
  • Most choices per voter (pick up to N only): the largest number of boxes a voter may tick. Leave it empty to use the number of seats.
  • Candidates: one per line, as Name | short bio | photo URL. The bio and the photo are optional; without a photo the ballot shows the candidate's initials. Use photos from your own media library.
  • Allow a write-in candidate: adds a box where voters can type another name. Write-ins are counted like any candidate; the same name typed in other letter cases is counted together.
  • Show the candidates in a random order for each voter: avoids an advantage for whoever is listed first.

Tick Required on a position if every ballot must say something for it. Otherwise a voter may leave a position empty, which is counted as a blank vote for that position. Do not change the candidates once voting has started: the count matches the names on the ballots.

Write the confirmation message the voter sees after casting the ballot under Form Settings → Confirmations, for example “Thank you. Your ballot has been cast.” Then place the form on a page of its own with the usual Gravity Forms block or shortcode. That page is the ballot page.

Election settings

Open Form Settings → Elections and tick This form is an election ballot. Then set:

  • How voters vote: with a personal one-time ballot link sent by e-mail, or logged in, for members who have a WordPress account.
  • Ballot page: the page with the form. Ballot links open this page.
  • Voting opens and Voting closes: in your site's time zone. Before the opening time and after the closing time the ballot is refused, on the page and on the server.
  • Quorum: none, a percentage of the voter roll, or a number of voters. The results show the turnout and whether the quorum was reached; what a missed quorum means is up to your rules.
  • Results: whether the results shortcode publishes the results after voting closes.
  • Tie-break seed: a random seed is set when you save. It is used only when a tie cannot be decided by an earlier round (see below). You may announce it in advance, or replace it with a value drawn in public, before voting closes.

When you save with link voting, the add-on adds a notification called Election ballot link with the event Election: ballot link. Edit its subject and text under Form Settings → Notifications like any notification. These merge tags are available: {election_ballot_link}, {election_voter_name}, {election_voter_email}, {election_title}, {election_opens} and {election_closes}. Keep the link tag in the message and the voter e-mail tag in Send To.

The voter roll

The voter roll screen of an election: the election settings, the number of voters, links sent, votes cast and turnout, the CSV and role import and each voter with their status
The voter roll: settings summary, roll numbers, imports and each voter's status.

Open Forms → Elections and choose the election. The Voter roll tab shows the election settings, how many voters are on the roll, how many links were sent, how many have voted and the turnout. Add voters in two ways:

  • From a CSV: paste the list or upload a file with the columns email, name and member number. A header row is recognised, and commas, semicolons and tabs all work. Rows with an invalid e-mail address and duplicates are skipped and counted in the message.
  • By WordPress role: tick one or more roles, for example a members role, and every user with that role is added with their account.

A person already on the roll (by member number or e-mail address) is never added twice, so you can import a CSV and a role that overlap. Each row shows whether the voter has voted. You can remove a voter who has not voted, send one voter a new link, or mark a voter as Voted on paper when they hand in a paper ballot. Once ballots have been cast the roll cannot be emptied.

Press Send ballot links to voters without one. The add-on sends the Election ballot link notification to every voter on the roll who has not received a link yet, in small batches, and shows the progress. Each link is signed by your site and works for one voter, once. Only a hash of the link is stored, so a copy of the database cannot be used to vote.

Send new links to all who have not voted is for reminders: each of those voters gets a fresh link, and their earlier link stops working. Members who have voted get nothing. After the closing time no more links are sent.

Logged-in voting

With logged-in voting, members open the ballot page while logged in to their WordPress account. The add-on checks that the account is on the roll (by account or e-mail address) and has not voted. Visitors who are not logged in see a link to log in; logged-in users who are not on the roll are told so. No links are sent in this mode.

What voters see

A ranked ballot: the voter's ranking with Move up, Move down and Remove buttons next to the candidates still to rank, a pick-one position with a write-in and a pick-up-to-two position
A ranked position, a pick-one position with a write-in and a pick-up-to-two position.

A voter who opens their link sees the ballot with every position. For a ranked position, the candidates are listed on the right; the voter adds their first choice, then their second, and so on, and may rank as many or as few as they like. The ranking can be changed by dragging, with the Move up and Move down buttons, or from the keyboard: focus a ranked candidate, press Space to pick it up, move it with the arrow keys and press Space to drop it. Delete removes a candidate from the ranking. Every change is read out by screen readers. For a pick-up-to-N position, the remaining boxes are disabled once the limit is reached.

When the voter presses the submit button, the server checks the link (or the account), the voting time and every position again. A ballot with too many choices or the same candidate twice is sent back with a message, and nothing is stored. A valid ballot is cast and the confirmation message is shown. Opening the link again shows that the ballot has already been cast.

How votes are kept secret

Casting a ballot is one step on the server: the voter's has voted flag is switched on only if it was off, and the choices go into the add-on's own ballot box under a random 32-character ID. The ballot box stores the ID, the form, whether the ballot came online or on paper, and the choices — nothing else: no name, account, e-mail address, IP address, link or time. The voter roll stores that a member has voted, but not when. Because the flag can only be switched on once, a second ballot from the same voter is refused, even when two requests arrive at the same moment.

The vote is never written to the Gravity Forms entry, and the entry of a cast ballot is removed, so nothing in Entries sits next to a vote. The usual “form submission” notifications are not sent for a ballot either, because their timing would show who voted when. Save and Continue is turned off on election forms.

How the votes are counted

  • Plurality (pick one): the candidate with the most votes wins.
  • Approval (pick up to N): each ticked candidate gets one vote; the candidates with the most votes win the seats.
  • Instant-runoff (ranked, one seat): every ballot counts for its highest-ranked candidate still in the race. If a candidate has more than half of those votes, they win. Otherwise the candidate with the fewest votes is eliminated and their ballots move to the next choice. Ballots with no choice left are exhausted and no longer count towards the majority.
  • Single transferable vote (ranked, several seats): the quota is the Droop quota, the number of valid ballots divided by the seats plus one, rounded down, plus one. A candidate who reaches the quota is elected. Their surplus is passed on: every ballot they hold moves to its next choice at a fraction of its value (surplus divided by their total). When no one reaches the quota, the candidate with the fewest votes is eliminated and their ballots move on at their current value. Values are kept to five decimals and rounded down, and any amount lost to rounding is shown.

Blank and spoiled ballots. A ballot that chooses nothing for a position is blank for that position. A ballot that breaks the rules of a position — more choices than allowed, the same candidate twice, or an unknown name when write-ins are off — is spoiled for that position. Online ballots are checked before they are cast, so spoiled ballots normally come from paper ballots. Blank and spoiled ballots are counted and shown separately and take no part in the count or the quota.

Ties. When candidates tie for elimination, or for the order in which they are elected, the tie is broken by the most recent earlier round in which their totals differed: the one with fewer votes there is treated as having fewer votes now. If they were equal in every earlier round, or there is no earlier round, the tie is broken by lot: the candidates are put in the order of the SHA-256 hash of the election seed, a vertical bar and the candidate's name in lower case, and the one that comes first is treated as having fewer votes. Every tie-break is listed with the results, and the seed is printed in the audit report, so anyone can repeat the draw. If your rules settle ties another way, for example by a fresh vote, follow your rules.

Results

Closed results of an instant-runoff election: turnout and quorum, the winner and a table with every round, the votes moved and who was eliminated
Closed results of an instant-runoff election with every round.

The Results tab counts every position. While voting is open it is an organiser preview, clearly marked: the results are hidden from everyone else. After the closing time it shows the final count: turnout and quorum, then for each position the method, the seats, the quota, the ballots (valid, blank, spoiled), who is elected and, for ranked positions, a table with every round, the change for each candidate, the exhausted ballots and what happened at the end of each round.

To publish the results on your site, add the shortcode [gf_election_results id="5"] to a page (use your form's ID). Add position="3" to show one position only (the ballot field's ID). Before the close the shortcode only says when the results will be published. If you untick the Results setting, the shortcode does not show the results.

Paper ballots

If some members vote by post or in person, add their ballots on the Results tab under Add paper ballots. Paste one ballot per row; the first row names the positions exactly as on the ballot. Write a ranking as First > Second > Third, several choices as A; B, and leave a cell empty for a blank vote. Paper ballots go into the same ballot box without any voter link and are counted with the online ballots; ballots that break the rules count as spoiled. Mark those members as Voted on paper on the voter roll, so their online link stops working and the turnout is right.

Anonymous ballots and the audit report

The audit report of a closed election: voting times, roll and turnout, the SHA-256 of the ballot set, the tie-break seed and rule and every round of the count
The audit report of a closed election.

After the close, the Results and Audit report tabs offer two downloads. The anonymous ballot CSV has one row per ballot: its random ID, whether it came online or on paper, and the choices for each position, sorted by the random ID so the order says nothing about when anyone voted. The audit report lists the voting times, the roll and turnout, the ballots, the SHA-256 hash of the ballot CSV, the tie-break seed and rule, and every round of every position. Anyone with the CSV can check that its hash matches the report and count the ballots again by hand or with another tool.

FAQ

Can an organiser see how a member voted?

No. The ballot box has no link to the voter roll: no voter ID, account, address or time is stored with a ballot, and the Gravity Forms entry is removed. Organisers see who has voted, not how.

Press Send link on their row of the voter roll. They get a new link and the old one stops working.

Can I run several elections at once?

Yes. Each election is its own form with its own roll, ballot box, times and results. Forms → Elections lists them all with their status and turnout.

Is the result legally valid?

That depends on your organisation's rules and the law that applies to it, which the add-on cannot know. The add-on counts the ballots in its ballot box as described here and documents the count; your organisers decide how the election is run and confirmed.

What does uninstalling remove?

The add-on's voter rolls, ballot boxes and settings. Your forms stay. Download the anonymous ballots and the audit report of every election you want to keep first.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr