Added switch statement to hook_form_alter.