Closed (fixed)
Project:
Advanced Poll
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2007 at 23:15 UTC
Updated:
22 Nov 2007 at 23:21 UTC
I'm using the advpoll.module creating a binary poll. I want to change the checkbox's to radios.
i tried doing this in my module.
function {mymodule}_form_alter($form_id, &$form)
{
// Changes to Advpoll from checkbox to radios
if($form_id == 'advpoll_voting_binary_form')
{
$form['choice']['#type'] = 'radios';
}
}
Once I do this the radios appear but the Poll now says "At least one choice must be selected." when i make a radio selection. I have seen this advpoll.module use this on this website http://advpoll.ck37.com/node?page=1
can someone walk me through what else I need to change to get this to work.
Comments
Comment #1
ChrisKennedy commentedSure, just change the maximum choices of the poll to 1 and it will automatically show as radio buttons.
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.