1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Display members who voted for each choice in a multi-choice poll

Discussion in 'XenForo Questions and Support' started by Optic, Apr 9, 2015.

  1. Optic

    Optic Well-Known Member

    Just wondering if it's possible to display a breakdown or list that shows which members have voted for each option in a poll?

    It's mainly for curiosity as I find the percentages confusing for multiple choice polls (i.e. they don't add up to 100%)

    I'm aware that the percentage behaviour is "as-designed" behaviour due to the percentages being calculated by dividing total number of voters vs. total number of votes.
  2. Mike

    Mike XenForo Developer Staff Member

    If the poll is public, when viewing the results, clicking on the number of votes for a choice will display the users that voted for it.
  3. Optic

    Optic Well-Known Member

    Thanks, I missed that option.

    Is it possible to enable this option once the poll has been created or would a change need to be made to the database?

    If so, can you advise what the query would be? :)
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You would need to check the xf_poll table, locate the poll based on the id or title and then change public_votes to 1.

    You can also do it with a query based on the thread ID.
    Be careful though, as your members may consider it a breach of privacy.
    UPDATE xf_poll SET public_votes = 1 WHERE content_id = x
    Dan Hawkins likes this.

Share This Page