I want to create form fields un-editable for anonymous users, that can be editable for other registered users. How can I do? I am using the webform module with Drupal 7.
Create a custom module and use hook_form_alter to achieve that.
function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id)
{
if($form_id == "YOUR_FORM_ID")
{
$form['name']['#disabled'] = TRUE; // or something similar.
}
}