By carlwenrich on
People seem to have trouble creating inline radio buttons on Drupal sites, so here's a quick demo that does it: http://aswapathy.com/d79de/irb
Here's the css (which resides in the irb.css file):
div.form-type-radio {
display: inline;
margin: 10px;
}
And here's the form (which resides in the irb.module file):
function irb($form, &$form_state) {
$form['#attached']['css'] = array(
drupal_get_path('module', 'irb') . '/irb.css',
);
$options = array(t('One'), t('Two'), t('Three'));
$form['radios'] = array(
'#type' => 'radios',
'#options' => drupal_map_assoc($options),
);
$form['br'] = array(
'#markup' => '<br />',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}