Implement Field Blocking Based on Cookie Consent

Created on 26 June 2025, about 2 months ago

It would be great to have a possibility to block individual fields based on the user's cookie consent preferences.

Currently, the Cookies Addons module has submodules for blocking blocks (cookies_addons_blocks) and views (cookies_addons_views), but there's no way to block specific fields when users haven't consented to relevant cookie categories.

For example:
- Block video embed fields when user declined marketing cookies
- Hide social media fields when tracking cookies are not accepted
- Block map fields (Google Maps) when functional cookies are declined
- Hide any field that might load third-party content requiring consent

I propose creating a separate sub-module "cookies_addons_fields" that would work exactly like cookies_addons_blocks but for fields, using the same configuration pattern and placeholder replacement logic.

This would complete the cookie consent coverage by adding field-level control alongside the existing block and view level controls.

✨ Feature request
Status

Active

Version

1.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024