This project is not covered by Drupal’s security advisory policy.

Webform Content Gate puts a content entity behind a Webform. A visitor who opens a gated page is sent to the form instead. Once they submit it, that one page is unlocked for the rest of their browser session. Nothing else is unlocked, and nothing survives the session.

How it works

Webform Content Gate is a Rabbit Hole behavior plugin, so it works on any entity type Rabbit Hole is enabled for, and it is configured wherever Rabbit Hole settings already live: per bundle, or per entity when you allow overrides.

  1. A visitor requests a gated entity.
  2. The gate redirects them to the configured Webform, carrying Webform's own source_entity_type and source_entity_id parameters plus a destination back to the entity.
  3. They submit the form. The module checks that the named entity really is gated by the Webform that was just submitted, then records the grant in the session.
  4. The destination returns them to the entity, which now renders.

Features

  • Works with any content entity type, not just nodes.
  • One Webform can gate many entities; each submission unlocks only the entity the visitor asked for.
  • Form location setting sends blocked visitors to a landing page that embeds the form, rather than to a bare form URL.
  • Private files attached to a gated entity are denied until the session holds a grant, via hook_file_download().
  • Each submission records which entity it unlocked, so lead reports name the asset rather than the form.
  • Blocked redirects are cacheable, so a crawler sweep over gated URLs costs one render rather than one per request.

Recommended modules

None of these are required, but a gated form is a public form and will attract bots.

Similar modules

Supporting organizations: 
Support and development
Support and development

Project information

Releases