Programmatically disabling webform component - Drupal 7 According to hook_form_alter doc for webform, I can target the component's properties using $form['submitted']['component_name'], etc. This works fine for altering title, weight, description. The form structure of webform looks something like:

Array
(
  [#tree] =&gt; 1
  [component_email] =&gt; Array
     (
       [#type] =&gt; webform_email
       [#title] =&gt; Email
         .
         .
       [#webform_component] =&gt; Array
         (
           .
           .
           [extra] =&gt; Array
             .
             [disabled] =&gt; 0


Simply changing the disabled property to true or 1 doesn't disabled the component. I have also tried the $form['#node']->webform path.
I have never had luck trying to set the disabled flag via a FormsAPI hook using the array indexes.  Looking at the code above, it would also seem that you are setting the incorrect 'disabled' for the form array - #disabled is what is checked during the rendering process.

But, like I said, never had much luck with it anyway.  What you may end up needing to do is set the #attributes array for the form element, specifically identifying the disabled property as in the html element tag:

&lt;input type='text' disabled /&gt;
// becomes
$form['element']['#attributes'] = array('disabled' =&gt; '1');


obviously with the form indexes specified as needed.