After webform submission restrict/greyout certain fields when user goes back in to edit
From Programmatically modifying a webform with hook_form_alter():
function mymodule_form_alter( &amp;$form, &amp;$form_state,$form_id ){
  global $user;
  if (!$user-&gt;uid &amp;&amp; $form_id == 'MY_WEBFORM_ID') {
    $form['submitted']['MY_FORM_COMPONENT']['#disabled'] = TRUE;
  }
}