By exaboy on
$options = array(
'poison' => t('Sprays deadly poison'),
'metal' => t('Can bite/claw through metal'),
'deadly' => t('Killed previous owner')
);
$form['danger'] = array(
'#title' => t('Special conditions'),
'#type' => 'radios',
'#description' => (t('Please note if any of these conditions apply to your pet.')),
'#options' => $options,
'#weight' => 25
);This is the code that i would like to implement in my form HOWEVER how would i disable (ie grey out) the "metal" in my list of options?
It seems to me the FORM API is missing this functionality.
Any advice would be sweet!
Jon...
Comments
'#disabled' => TRUE
'#disabled' => TRUE
Please see the forms api reference: http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...
ian
Fantasy Formula 1
#disabled radios
But this should disable the whole set of radio buttons whereas the question is how to disable one of them cleanly.
--
binki
...
See here.
(I mentioned a bug in D6 there, but you're on safe ground as it doesn't apply to radios.)