XF 2.2 How to make checkbox on a poll closing date checked by default?

GrowLabz

Member
My members nominate people for membership, and when submitting a poll most of the time they forget to check the box to close the poll after a certain number of days. I have set that number of days to a default of 7, but I was wondering if it was possible to edit a template to choose whether or not the option to select the poll closing date is checked by default (and maybe even with the option to unchecked it grayed out so it can't be changed), when posting in certain forums/nodes?
 
Edit the poll_macros template on line 261 like so:

HTML:
<xf:option checked="1" name="poll[close]"

If you want to have different behaviour for different forums, you will need to use conditional statements.
 
Edit the poll_macros template on line 261 like so:

HTML:
<xf:option checked="1" name="poll[close]"

If you want to have different behaviour for different forums, you will need to use conditional statements.
Thanks once again! I appreciate the help. So if I wanted to have this only work for forum 20 but have that option not selected on every other forum, what is the proper syntax? I have been fooling around with it for a bit and luckily xenforo's AI won't allow me to make rookie mistakes and keeps throwing up warning errors.
 
Back
Top Bottom