how to make a field disabled, greyed out I found the hide() function to make a form field hidden. Is there a similar function for making a field disabled or greyed out? I want it to display but not allow it to be edited.
I am pretty sure you are looking for the #disabled property, eg the Form API Reference Disabled Property that...


  Disables (greys out) a form input element. Setting #disabled to TRUE results in user input being ignored, regardless of how the element is themed or whether JavaScript is used to change the control's attributes.