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' => 'radios',
'#title' => t('Category'),
'#options' => array('P' =>'Product','S' => 'Services','O' =>'Others'),
'#theme' => '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' => array(
'arguments' => array('element' => 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;
}