I am trying to make a textareas and textfields disabled and grayed out so that they cannot be edited by the end user. I am attempting to use the "#disabled" attribute as mentioned at:
http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference...
The code snippets I am attempting to use are:
$form['basics']['show_funding'] = array
(
'#type' => 'textfield',
'#title' => t( "Funding" ),
'#required' => TRUE,
'#default_value' => $customParts['show_funding'],
'#weight' => -3,
'#disabled' => TRUE,
'#description' => t( "How much money are you asking for?" )
);
$form['textArea'][ $fieldName ] = array
(
'#type' => 'textarea',
'#rows' => 5,
'#title' => $fieldTitle,
'#required' => FALSE,
'#default_value' => $blurb['body'],
'#weight' => $blurb['weight'],
'#disabled' => TRUE
);
I have tried to insert 1, TRUE, and "disabled" into the "#disabled" attribute, all to no avail. I have scoured the documentation and Drupal support forums and found no mention of this issue. I am running Drupal 4.7.4 Any help is appreciated.
~ Alicia K