Flag

Module Type: 
Supported
Sitewide Tags: 
Polls/Voting

The Flag module allows users or site visitors to mark posts and content to indicate preferences or options desired by the visitor. Once logged in, a site visitor can click on a link or image to Vote or “flag” an option. Click on this link to see how we used Flags for voting and picking sessions for the YaleSites DrupalCamp.

Here’s how we created those Flags:

  1. Enable the Flag module Modules > Flag and Flag actions.
  2. Configure the module in the following way:
    • Structure > Flags > Add a new flag
    • Give the Flag a Name (session_vote) and don’t change anything else.
    • Provide a readable Name - Vote for a Session on the resulting page.
    • Add message
    • Indicate who can use the Flags (not available for Anonymous Users)
    • Indicate the Content Type associated with the Flag
    • Scroll down and Save. Additional changes are optional.

Adding the Flag to a View

  1. Create a view in a table format with the Content from the Bundle or Content Type you have chosen above.
  2. Create a relationship with the Flag (must be done first for the fields to show up).
  3. Add the Flag fields to the Fields section.

Using an Image to display rather than text

  1. Upload the following image to your site in any basic page.
  2. Enable CSS Injector (if it is not already enabled) and add the following CSS:
    Flag CSS