Select only one radio button in a webform What I need to do is allowing to select only one radio button in a multi-column radios, but each column is in a &lt;div&gt;, so they are like in different groups. Here is an example of the code:

$form['submitted']['fieldset_time']['time8am'] = array(
  '#type' =&gt; 'radios',
  '#options' =&gt; array('8:30', '8:45'),
  '#prefix' =&gt; '&lt;div style="display:inline-block"&gt;',
  '#suffix' =&gt; '&lt;/div&gt;',
  '#title' =&gt; '8 a.m.',
  '#weight' =&gt; 8,
);

$form['submitted']['fieldset_time']['time9am'] = array(
  '#type' =&gt; 'radios',
  '#options' =&gt; array('9:00','9:15','9:30', '9:45'),
  '#prefix' =&gt; '&lt;div style="display:inline-block"&gt;',
  '#suffix' =&gt; '&lt;/div&gt;',
  '#title' =&gt; '9 a.m.',
  '#weight' =&gt; 9,
);


With this code, the radios are displayed in 2 columns but I can choose two options, what can I do to only allow to choose one?
The problem with the radios approach is that they're separate form fields, so the browser is correctly allowing only one selection per field.

Instead, you should use radio - https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7#radio and specify the attribute of name to only allow one value to be selected.

I'm assuming this is going to be built programmatically in a loop instead of procedurally, but I'll demonstrate as if this was hard-coded. Also, in a perfect world you'd add markup in the theme, not in the form definition.

$form['submitted']['800_title'] = array(
  '#markup' =&gt; '8 a.m.',
  '#prefix' =&gt; '&lt;div style="display:inline-block"&gt;',
);

$form['submitted']['830'] = array(
  '#type' =&gt; 'radio',
  '#value' =&gt; 'default',
  '#return_value' =&gt; '0830',
  '#title' =&gt; t('8:30am'),
  '#attributes' =&gt; array('name' =&gt; array('time')),
  '#prefix' =&gt; '',
  '#suffix' =&gt; '',
);

$form['submitted']['845'] = array(
  '#type' =&gt; 'radio',
  '#value' =&gt; 'default',
  '#return_value' =&gt; '0845',
  '#title' =&gt; t('8:45am'),
  '#attributes' =&gt; array('name' =&gt; array('time')),
  '#prefix' =&gt; '',
  '#suffix' =&gt; '&lt;/div&gt;',
);

$form['submitted']['900_title'] = array(
  '#prefix' =&gt; '&lt;div style="display:inline-block"&gt;',
  '#markup' =&gt; '9 a.m.',
);

$form['submitted']['900'] = array(
  '#type' =&gt; 'radio',
  '#value' =&gt; 'default',
  '#return_value' =&gt; '0900',
  '#title' =&gt; t('9:00am'),
  '#attributes' =&gt; array('name' =&gt; array('time')),
  '#prefix' =&gt; '',
  '#suffix' =&gt; '',
);

$form['submitted']['915'] = array(
  '#type' =&gt; 'radio',
  '#value' =&gt; 'default',
  '#return_value' =&gt; '0915',
  '#title' =&gt; t('9:15am'),
  '#attributes' =&gt; array('name' =&gt; array('time')),
  '#prefix' =&gt; '',
  '#suffix' =&gt; '&lt;/div&gt;',
);