dupal form: how to assign specific id to radio button using form api I wanted to change id of radio button. But i dont know which attribute shall i use to do that. 

$form['entry.497535900'] = array(
'#type' =&gt; 'radios',
'#title' =&gt; t('Category'),
'#options' =&gt; array('P' =&gt;'Product','S' =&gt; 'Services','O' =&gt;'Others'),


);
If you need to assign IDs to each radio option, then you can use custom theme function, to theme your radios. See example:

$form['entry.497535900'] = array(
  '#type' =&gt; 'radios',
  '#title' =&gt; t('Category'),
  '#options' =&gt; array('P' =&gt;'Product','S' =&gt; 'Services','O' =&gt;'Others'),
  '#theme' =&gt; 'mymodule_custom_radios',  
);


The #theme parameter specifies function, which overrides the default radios styling function. You will need to define this function in hook_theme() and create the content of the function, where you can specify, how radios should be rendered.

/**
 * Implements hook_theme.
 */
function mymodule_theme($existing, $type, $theme, $path) {
  return array(
    'mymodule_custom_radios' =&gt; array(
      'arguments' =&gt; array('element' =&gt; NULL),
    ),
  );
}


Then create the content of this function.

function theme_mymodule_custom_radios($element) {
  // You can access all radios options like this - $element['#options'];

  $output = '';
  // ... create html output according to your needs
  return $output;
}