Sentenza Member Nov 30, 2020 #1 Hello, Is it somehow possible to select the poll option "display votes publicly" as default value?
Solution Paul B Nov 30, 2020 Edit the poll_macros template and change line 243 from this: HTML: <xf:option name="poll[public_votes]" selected="{{ ($draft AND $draft.public_votes) OR $poll AND $poll.public_votes }}"> To this: HTML: <xf:option name="poll[public_votes]" selected="{{ 1 }}"> Note that only sets the checkbox to active, it doesn't remove the ability to uncheck it.
Edit the poll_macros template and change line 243 from this: HTML: <xf:option name="poll[public_votes]" selected="{{ ($draft AND $draft.public_votes) OR $poll AND $poll.public_votes }}"> To this: HTML: <xf:option name="poll[public_votes]" selected="{{ 1 }}"> Note that only sets the checkbox to active, it doesn't remove the ability to uncheck it.
Paul B XenForo moderator Staff member Nov 30, 2020 #2 Edit the poll_macros template and change line 243 from this: HTML: <xf:option name="poll[public_votes]" selected="{{ ($draft AND $draft.public_votes) OR $poll AND $poll.public_votes }}"> To this: HTML: <xf:option name="poll[public_votes]" selected="{{ 1 }}"> Note that only sets the checkbox to active, it doesn't remove the ability to uncheck it. Upvote 1 Downvote Solution
Edit the poll_macros template and change line 243 from this: HTML: <xf:option name="poll[public_votes]" selected="{{ ($draft AND $draft.public_votes) OR $poll AND $poll.public_votes }}"> To this: HTML: <xf:option name="poll[public_votes]" selected="{{ 1 }}"> Note that only sets the checkbox to active, it doesn't remove the ability to uncheck it.
Paul B XenForo moderator Staff member Aug 22, 2021 #5 Most likely it's the same template edit. Upvote 0 Downvote
H hellboy78 Active member Aug 22, 2021 #6 yes, I tested on 2.2 and it works but I tested on 2.1 and it doesn't Upvote 0 Downvote
Paul B XenForo moderator Staff member Aug 22, 2021 #7 I don't have access to a 2.1 installation so am unable to check. Upvote 0 Downvote