WordPress.org

Ready to get started?Download WordPress

Forums

WP-Polls
[resolved] Adding new answer resets max num answers to 1 (7 posts)

  1. archon810
    Member
    Posted 1 year ago #

    Hey Lester,

    There is a bug in the Javascript that resets the max number of allowed answers to 1 when you edit a poll and add a new answer. So if you set it to 3, then press Add Answer, the number is reset back to 1, which you will likely not even notice until someone complains.

    The JS re-enumerates the dropdown but forgets to reinstate the currently selected option. It should keep it the same if adding answers and drop it down by one if removing.

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

  2. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

  3. archon810
    Member
    Posted 1 year ago #

    Confirmed fixed for adding, but removing resets to 1 rather than just keeping it the same, so it's not all fully fixed yet.

    Ideally, it would:
    - if last position, go to i-1, unless i==1
    - if not last position, keep the same index

  4. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm I tried removing the answer, it doesn't reset to 1, it still maintain the index.

  5. archon810
    Member
    Posted 1 year ago #

    Set it to the last number, then remove, it shouldn't drop back down to 1, but it does.

  6. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

  7. archon810
    Member
    Posted 1 year ago #

    There we go, works like a charm now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags