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

null vote if viewing vote results


Well-known member
when a poll is running, I would like to prevent people from viewing the results before they vote. This could be done by:

Hiding the view results button until after someone has voted
Or by preventing them casting a vote if they view the results first (mulling the vote)

Is this currently possible by way of file edit or addon?

Jake Bunce

XenForo moderator
Staff member
Admin CP -> Appearance -> Templates -> poll_block_vote

Remove the red code:

Rich (BB code):
<xen:edithint template="polls.css" />
	<ol class="pollOptions">
		<xen:foreach loop="$poll.responses" key="$pollResponseId" value="$response">
			<li class="pollOption"><label><xen:if is="{$poll.multiple}">
				<input type="checkbox" name="response_multiple[]" value="{$pollResponseId}" /><xen:else />
				<input type="radio" name="response" value="{$pollResponseId}" /></xen:if>
	<div class="buttons">
		<xen:if hascontent="true">
			<div class="pollNotes">
				<xen:if is="{$poll.multiple}">
					<span class="multipleNote muted">{xen:phrase multiple_votes_allowed}</span>
				<xen:if is="{$poll.public_votes}">
					<span class="publicWarning muted">{xen:phrase your_vote_will_be_publicly_visible}</span>
		<input type="submit" class="button primary" value="{xen:phrase cast_your_vote}" accesskey="s" />
		<input type="button" value="{xen:phrase view_results}" class="button OverlayTrigger" data-href="{xen:link threads/poll/results, $thread}" />
		<noscript><a href="{xen:link threads/poll/results, $thread}" class="button">{xen:phrase view_results}</a></noscript>
That will hide the results button. They can only view results by voting.