RichardKYA
Well-known member
If you are 1 response away from the total maxResponses when you go to edit a poll, the additional field shows as expected, but the "add additional response" button also stills shows even though you can not add any further responses, so you are left with a 'dead' button.
To replicate:
1: Set "Maximum Number of Poll Choices" to "3" (it can be any number, this is just to make things easier for testing)
2: Create a poll with only 2 responses
3: Edit the poll and you'll see the field for your 3rd (and final) response and also the button (which does nothing when clicked)
I found that doing this in 'thread_poll_edit' fixes the issue:
Find:
Replace:
Anyway, I'll leave it with you guys to do as you please, thanks for reading
To replicate:
1: Set "Maximum Number of Poll Choices" to "3" (it can be any number, this is just to make things easier for testing)
2: Create a poll with only 2 responses
3: Edit the poll and you'll see the field for your 3rd (and final) response and also the button (which does nothing when clicked)
I found that doing this in 'thread_poll_edit' fixes the issue:
Find:
Code:
<input type="button" value="{xen:phrase add_additional_response}" class="FieldAdder button smallButton" data-source="ul.PollResponseContainer li" data-maxfields="{$xenOptions.pollMaximumResponses}" />
Replace:
Code:
<xen:if is="{xen:count $poll.responses} < {xen:calc '{$xenOptions.pollMaximumResponses} - 1'}">
<input type="button" value="{xen:phrase add_additional_response}" class="FieldAdder button smallButton" data-source="ul.PollResponseContainer li" data-maxfields="{$xenOptions.pollMaximumResponses}" />
</xen:if>
Anyway, I'll leave it with you guys to do as you please, thanks for reading