Problem/Motivation

In one of project I work on I need to hide some of webform questions in some cases, but there is no way to do this.

Proposed resolution

It would be nice to add a new hook, which checks if any module wants to deny access to specific webform component.

Comments

belkosyak’s picture

Assigned: belkosyak » Unassigned
Status: Active » Needs review
StatusFileSize
new687 bytes

The attached patch adds described hook

quicksketch’s picture

Status: Needs review » Postponed (maintainer needs more info)

In one of project I work on I need to hide some of webform questions in some cases, but there is no way to do this.

You could use hook_form_alter() and set #access = FALSE on the field you wanted to hide. Considering $form['#node'] and $form_state['values'] (or $form_state['storage']) is going to contain everything you'd have in this hook already, I can't see the justification for this patch. Maybe there's something I'm missing?

danchadwick’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (works as designed)