Welcome to Geeklog, Anonymous Tuesday, November 28 2023 @ 06:32 pm EST
Geeklog Forums
Dropdown menu for poll
Hayrettin
Anonymous
Is it possble to use a dropdown menu for poll voting instead of radio buttons? I want it because when there are too many options to vote for, the block occupies too much space. Thank you!
3
2
Quote
Quote by Hayrettin: Is it possble to use a dropdown menu for poll voting instead of radio buttons?
Hopefully someone will find it useful

In order to get a dropdown list for polls you need to modify two templates:
pollanswer.thtml
Text Formatted Code
<option value="{answer_id}">{answer_text}</option>and
pollblock.thtml
Text Formatted Code
<b>{poll_question}</b><form action="{poll_vote_url}" name="Vote" method="POST">
<input type="hidden" name="qid" value="{poll_id}">
<select name="aid" size="1">
{poll_answers}
</select>
<input type="submit" value="{lang_vote}">
<a href="{poll_results_url}">{lang_results}</a>
</form>
<span class="block-vote">{num_votes} {lang_votes}{poll_comments}</span><br>
Works forme

Geeklog Polish Support Team
4
2
Quote
All times are EST. The time is now 06:32 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content