I have programmed module having a form (using Drupals's form API) which contains radio checkboxes like this:
$form['r_8'] = array(
'#type' => 'radios',
'#options' => array(
'1' => t('Yes'),
'0' => t('No')
),
'#required' => TRUE,
'#checked' => '', // ???
'#title' => t('a label text ... '),
'#default_value' => !empty($form_state['values']['r_8']) ?
$form_state['values']['r_8'] : '',
'#suffix' => '<div style="clear: left"></div>'
);
When the page with that form is initially loaded, I want all these radios initially unchecked. I tried to set the #checked property to FALSE, but it doesn't work. Setting the #default_value to, for example, -1, a warning raises (which I can understand, because -1 is none of the provided option values).
Is there any way to load initially the form with the radio's unchecked?
I could not find any information pointer so that's why I ask here.
Thanks in advance!