Hi I am trying to disable all the form elements of the form. I am using this code to disable the form .
foreach (element_children($form) as $key) {
$form[$key]['#disabled'] = TRUE;
$form['#attributes'] = array('disabled' => TRUE);
}
drupal_set_message("Website is currently in read only mode. During this it is not possible to change site content", "warning");
}
It is working for textbox, radios and submit button but not for the select list and checkbox. What shall I do?