WordPress.org

Forums

WP-Polls
Radio Button submit onclick (4 posts)

  1. btbias
    Member
    Posted 1 year ago #

    Hi there! I've installed WP Polls on this website: http://test.2minaudition.com/
    You will see that I have two options that a user can vote for, basically Option 1 or Option 2.

    My goal is to make it so that a user can click a submit button to vote for one of the options, rather than selecting the radio button and then hitting "submit." Let me put it in steps:

    1) Remove the Submit Button (which I've done)
    2) Change the Radio Button to a Submit Button
    3) To vote, the user simply clicks the appropriate Submit Button.

    So far I've been able to convert the inputs to buttons, but the onclick doesn't work (you get a pop-up saying, "please choose a valid poll answer")

    The original Input Body:
    <input type="%POLL_CHECKBOX_RADIO%" id="poll-answer-%POLL_ANSWER_ID%" name="poll_%POLL_ID%" value="%POLL_ANSWER_ID%" /> <label for="poll-answer-%POLL_ANSWER_ID%">%POLL_ANSWER%</label>

    My recoded Input Body:
    <input type="button" id="poll-answer-%POLL_ANSWER_ID%" name="poll_%POLL_ID%" value=" %POLL_ANSWER% " onclick="poll_vote(%POLL_ID%);" />

    How can I get this sucker to work?

    http://wordpress.org/extend/plugins/wp-polls/

  2. dvwp
    Member
    Posted 1 year ago #

    like many others i'm interested in this solution as well.

    in a poll where there are say 3 options, i would prefer to use three buttons (not radio buttons)

    whenever the button is pressed, it automatically makes the vote. faster for the user, less space on the page.

    there is no need for a 'vote' button in this method.

    what is the code needed to enter in the form section of your settings page?

    kind regards.

  3. blue ant
    Member
    Posted 1 year ago #

    i'm interested in this feature as well. how can we get it done?

  4. 3x3m3
    Member
    Posted 1 year ago #

    I'd be very interested too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic