WordPress.org

Ready to get started?Download WordPress

Forums

YOP Poll
[resolved] Possible to record votes w/o a vote button? (2 posts)

  1. Runtheball
    Member
    Posted 1 year ago #

    Is there a way to record votes without any vote button displaying? In other words, if our poll has one question with 3 answers, can we have a click on any of those answers register the vote?

    Just want to know if its possible, and if so, perhaps a hint as to how to make it happen?

    http://wordpress.org/extend/plugins/yop-poll/

  2. YOP
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Runtheball,

    You can do that, just follow the instructions below:

    - from the main menu, go to "Templates" and edit the one you used for your poll;

    - in Template Before Vote section, replace

    <div>%POLL-VOTE-BUTTON%</div>

    with

    <div id="yop_poll_vote-button-%POLL-ID%"></div>

    - in the JavaScript section, after jQuery(document).ready(function(e) {
    add

    jQuery(".yop-poll-li-answer-%POLL-ID% :radio").click(function() {
        if (jQuery(this).attr('checked')) {
            yop_poll_do_vote('%POLL-ID%');
       }
    });

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Regards,

    YOP Team

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic