I have a form with a radios type, but I want one of the choices to be greyed out depending on a conditional. Is there a way to do this?

Comments

tecjam’s picture

You could simply do this with some jquery or have you had a look at the Conditional Fields module?

samtheory2718’s picture

I haven't looked at this module, but just to clarify, it's the greying out of a radio button that I'm having questions with - how would I use jquery to do this?

tecjam’s picture

Disables: $("#button").attr("disabled", "disabled");

Enables: $("#button").removeAttr("disabled");

Where the button has the css id #button

guldi’s picture

Have a look at this:

http://drupal.org/node/284917

This solved the problem for me. (#disabled_options = array(1, 2, 3))