I'm trying to identify the template or function that generates the tabs at the top of the results tab.

Please advise?

Comments

quicksketch’s picture

The tabs are generated from the menu system and then rendered by page.tpl.php. If you want to remove the analysis tab, you may do so with hook_menu_alter() in a module. That's probably the best way.

function mymodule_menu_alter(&$items) {
  // Disable access entirely:
  $items['node/%webform_menu/webform-results/analysis']['access callback'] = FALSE;

  // Or just visually remove the tab:
  //$items['node/%webform_menu/webform-results/analysis']['type'] = MENU_CALLBACK;
}
quicksketch’s picture

Status: Active » Fixed

Marking fixed for now. There isn't an option in the UI to do this, so the above options are the only known ways of doing this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mixael’s picture

Hello!
Sorry for newbie question but where to put your code?
Please give some steps how to.

Found answer - new module must be created with your code.

judy07’s picture

how to remove results tab from webform?

mixael’s picture

Go to webform settings and disable Results Access for role you need.