$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

ff1’s picture

ohnobinki’s picture

But this should disable the whole set of radio buttons whereas the question is how to disable one of them cleanly.

--
binki

mooffie’s picture

See here.

(I mentioned a bug in D6 there, but you're on safe ground as it doesn't apply to radios.)