Polls Documentation

Tags

These terms are used throughout the documentation:
required: This parameter/field is required for this tag to function.
form only: This can only be set as a field in the form and not as a parameter in the tag.
param only: This parameter can only be set in the tag and not as a field in the form.
fixed value: This field cannot be edited and is set with a fixed value.
recurring only: This parameter/field only applies to recurring charges.
one-time only: This parameter/field only applies to one-time charges.
added in X.X.X: This parameter/field is only available from this version forward.
logged in: This tag is only available if the user is logged in.
Tag Parameters
poll_id
required
string
Passing the ID of the poll will display that specific poll. You can find this ID on the "dashboard" page of the Polls Module. You can also pass "random" to return a random poll or "newest" to return the latest poll.
{exp:polls:poll poll_id="1"}
{exp:polls:poll poll_id="newest"}
output_html
integer
If this parameter is set, the default poll style will be output to the browser. If you want to customize the poll, omit this parameter.
{exp:polls:poll output_html="1"}
submit
Allows you to change the default text of the submit button.
{exp:polls:poll submit="new submit button text"}
view_results
Allows you to change the default text of the view results button.
{exp:polls:poll view_results="new view results button text"}
Condititonal Variables
poll_is_open
This condition allows you to control if thepoll is shown or not by setting the status attribute in the Polls control panel.
{if poll_is_open} display poll  {/if}
poll_show_vote
This condition determines if the user is on the voting "page" of the poll process.
{if poll_show_vote} Show info for voting form {/if}
poll_show_results
This condition determines if the user is on the poll results "page" of the poll process.
{if poll_show_results} Show poll results data {/if}
poll_limit_votes
This condition returns true if the poll votes are limited per user.
{if poll_limit_votes}Limited to one vote.{/if}
has_voted
This condition determines if the current visitor has voted on the current poll yet.
{if has_voted}You've already voted.{/if}
Variables
poll_id
integer
Outputs the poll id
{poll_id}
poll_question
string
Outputs the poll question
{poll_question}
poll_total_votes
Outputs the total number of votes on the poll
{poll_total_votes}
poll_options
Loops through the poll options
{poll_options}
    {option_input}
    {option_label}
    {option_value}
    {option_votes}
    {option_ratio}
{/poll_options}
option_input
Outputs the option radio button for the poll form.
{option_input}
option_label
Outputs the option text
{option_label}
option_votes
Outputs the total votes for the option
{option_votes}
option_ratio
Outputs the percentage of votes for the option
{option_ratio}
poll_form
Outputs the form html
{poll_form}{/poll_form}
poll_form_errors
Outputs the errors returned from submitting invalid form data
{poll_form_errors}
poll_form_submit
Outputs the form submit button
{poll_form_submit}
poll_view_results
Outputs the "View Results" submit button
{poll_view_results}
poll_view_options
Outputs the poll view options button
{poll_view_options}

Support

Having problems setting up and/or using Polls? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.

loading