Optimized view handling in hook_form_alter