Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 10:41 am EDT

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!
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
working
Quote by Hayrettin: Is it possble to use a dropdown menu for poll voting instead of radio buttons?

Hopefully someone will find it useful Wink 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 Smile
Geeklog Polish Support Team
 Quote

All times are EDT. The time is now 10:41 am.

  • 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