Welcome to Geeklog, Anonymous Friday, November 22 2024 @ 09:26 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!
6
5
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 The below changes apply to GL 1.4.0, Professional theme.
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
9
9
Quote
All times are EST. The time is now 09:26 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