Elections

Introduction

In a move to save time and money, and to draw members to the web site, IAC conducted its first on-line election in early 2014. I was able to set up the whole thing using Drupal's popular Webform module.

Each election is a single webform node, and each ballot that is cast is one webform submission.

Setup

The body of the webform contains a preamble: the words "Official IAC Ballot" plus some background information. Additional material, such as links to PDF files, could also go in the node body.

Just below the body is a pull-down menu entitled webform_tags. You must select Election, otherwise the tally sheets (see below) won't work properly.

I recommend clicking on the Publishing Options box (lower left of the Edit screen), un-checking the Published box, and checking the Premium content box. This will keep ordinary users from being able to access the form until you're done with it, and keep anonymous users from using the form to vote. Once you're filling out the node body, click the Save button.

To set up the actual ballot questions, click on the Webform tab. This will place you on the Form Components page.

Each question on the ballot consists of two webform components: a markup component that contains the text of the question, and a select options component that presents the user with set of choices. To set up a simple yes/no vote, put the following into the Options text box:

Yes|Yes
No|No

Candidate names would be similarly specified:

John Doe|John Doe

Joe Blow|Joe Blow

Dosie Doe|Dosie Doe

For our first single-question ballot, I checked the Required box ballot in case a user hits the Submit before making a selection. Note the Multiple checkbox, which would allow the user to make multiple selections; this would be handy for election of Directors, in which members can pick multiple candidates from a list.

The Form Validation tab lets you create sophisticated tests, such as Maximum selections allowed -- also useful for Director elections.

The Emails tab lets you send a copy of each user's vote somewhere via email. I set up a dedicated Gmail account for the first election, to serve as a backup and audit control. (The webform module records and counts all votes automatically, and is our primary repository for election results.) You can specify multiple recipients in a comma-separated list, and you can insert tokens in the recipient list, like so: iac.ballot.spring.2014@gmail.com,[current-user:mail]. This means that both the dedicated mailbox and the IAC member receive a copy of the message. Tokens can also be used in the Subject: line and body of the email.

Finally, the Form Settings tab lets you configure a completion message (e.g., Thank you for voting), limit the number of votes allowed per user (one, in the case of IAC elections), and choose which user roles can access the form; typically we would only allow current member users to vote.

Opening and Closing the Election

To make the form "live", perform the following steps:

  • Go to the Results tab, and select "Clear" to delete any test votes.
  • Edit the webform, click on Publishing Options (lower left), and check the Published box.

At the end of the voting period, un-check the Published box to disable the voting.

Publicity

I created a block that encourages anonymous users and logged-in members who haven't already voted to do so. Take the following steps in order to make this block operational:

  1. Under Region Settings / IAC3, select Sidebar second from the pull-down menu.
  2. Edit the PHP code in the Show block on specific pages section, replacing the node_load parameter with the node ID of the current year's election webform.
  3. At the bottom of the page, click the Save block button.

To disable the reminder block, go to Admin -> Structure -> Block, and change the election block's "Region" to "- None -".

Security

Votes are confidential and must not be altered once they are cast. Therefore I created a new role called Elections Official and assigned that role to the Nominations chair (currently Lynne Stolenberg) and IAC Secretary (currently Jim Ward.) Only an Elections Official or Administrator may view the individual votes and vote totals, and only an Administrator may delete voting results

IAC also allows members to cast paper ballots, therefore the elections officials need to cross-check the paper and electronic ballots to ensure that no member votes more than once. To facilitate this exercise, I created a tally sheet for each election (see "Tallying Results" below).

Tallying Results

Go to the List of Elections page. You will see a display like this:

The Created column shows the date on which the webform was initially created. By default the list of elections is sorted from newest to oldest. The Active? column indicates whether the webform is published, which in turn determines whether voting in that election is open (Yes) or closed (No).

Clicking a link under the Vote Totals column will show you the total number of votes for each ballot question. Clicking a link under the Tally Sheet column will show you the list of members who voted in the election. 

Conclusion

Webform fits our needs pretty nicely, but does require a little effort to get the settings "just so".