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

ChrisKennedy’s picture

Status: Active » Fixed

Sure, just change the maximum choices of the poll to 1 and it will automatically show as radio buttons.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.