You are here

function hosting_package_form_views_exposed_form_alter in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 package/includes/views/hosting_package.views.inc \hosting_package_form_views_exposed_form_alter()

Implements hook_form_FORM_ID_alter().

File

package/includes/views/hosting_package.views.inc, line 287
Hosting package views integration.

Code

function hosting_package_form_views_exposed_form_alter(&$form, &$form_state) {

  // The status filter doesn't make sense on platforms.
  if ($form_state['view']->name == 'hosting_package_list' && is_numeric(arg(1)) && ($node = node_load(arg(1)))) {
    if ($node->type == 'platform') {
      $form['status']['#access'] = FALSE;
      unset($form['#info']['filter-status']);
    }
  }
}