Polls Documentation

Default Poll HTML

This is the default style HTML for polls. Use it as a reference when customizing to fit your needs.

{exp:polls:poll poll_id="your_poll_id"}
<div id="poll-{poll_id}" class="poll">
    {if poll_is_open}



            <ul class="answers">
                    <li class="option">
                        {if poll_show_vote}
                            <div class="radio">{option_input}</div>
                            <label>- {option_label}</label>
                            {if option_is_other}
                                <div class="textfield">{option_input_other}</div>
                        {if:elseif poll_show_results}
                            <div class="option-value">{option_value}</div>
                            <div class="option-detail">
                                <div class="vote-count">{option_votes} votes</div>
                                <div class="vote-ratio">{option_ratio}%</div>
                            <div class="option-bar"><div class="option-bar-value" style="width:{option_ratio}%;"></div></div>

            {if poll_show_vote}
                <div class="buttons">
                    <div class="cast-vote">{poll_form_submit}</div>
                    <div class="view-results">{poll_view_results}</div>
                <div class="poll-detail">
                    {if poll_limit_votes AND has_voted}
                        <p>Thank you for voting!</p>
                        <div class="view-options">{poll_view_options}</div>
                    <div class="total-votes">{poll_total_votes} Total Votes</div>

            <input type="hidden" name="poll_id" value="{poll_id}" />



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.