Drupal is a registered trademark of Dries Buytaert

dga_feedback

5 sites No security coverage
View on drupal.org

DGA Feedback Module

The feedback page is designed to gather user insights. It includes a brief introduction encouraging feedback, followed by sections for rating, comments, and suggestions. Clear prompts guide users to share their opinions, making the process simple and inviting.

Features

  • Yes/No Feedback Widget: Simple binary feedback system (Was this page useful?)
  • Reason Selection: Dedicated reason lists for both Yes and No responses (multi-select)
  • Optional Feedback Text: Free-form textarea for additional comments
  • Demographic Data: Optional gender selection (Male, Female, or Prefer not to say)
  • Live Statistics: Real-time display of feedback (percentage + total count)
  • UI-Based Translations: Manage all English & Arabic strings via the admin UI (no .po files)
  • Inline Validation: Friendly inline error messages for each required field
  • Auto Refresh: Widget resets automatically after submission (configurable delay)
  • Custom Admin Navigation: DGA Feedback → Feedback Dashboard, Settings, Translations (SVG icon in toolbar)
  • Admin Dashboard: Full submissions dashboard with filters, bulk actions, and statistics
  • Role-Based Access Control: Separate permissions for viewing the dashboard, moderating submissions, and managing settings
  • DGA Design System Compliant & Accessible

Installation

  1. Place the module in web/modules/custom/dga_feedback/
  2. Enable the module via Drush: drush en dga_feedback
  3. Or enable via the Drupal admin interface: Extend > Custom > DGA Feedback

Configuration

Menu Structure

  • DGA Feedback (main menu with custom SVG icon)
    • Feedback Dashboard – View submissions and statistics
    • Settings – Configure widget behavior, rate limiting, and refresh delay
    • Translations – Manage English & Arabic text for the widget, validation, and menu items

Configure Translations

  1. Navigate to DGA Feedback > Translations (/admin/content/dga-feedback/translations)
  2. Each section provides bilingual (EN/AR) fields displayed side-by-side:
    • Closed State: Question text, Yes/No buttons, statistics template
    • Feedback Form: Close button, reasons title, reasons instruction, reason lists (multi-line input for Yes / No), feedback label/placeholder, gender labels (Male, Female, Prefer not to say)
    • Submitted State: Success message
    • Validation Messages: All error messages (Yes/No required, reason required, feedback required, submission failed, unknown error)
    • API & Backend Messages: Method not allowed, invalid JSON, rate limit, save failed, success message
    • Menu Items: DGA Feedback, Feedback Dashboard, Settings, Translations titles
  3. Note: Reasons instruction field should not include parentheses (they are added automatically by the template)
  4. Save to apply instantly (no cache clear required)

Configure Widget Behavior

  1. Navigate to DGA Feedback > Settings (/admin/config/dga-feedback/settings)
  2. Configure:
    • Widget refresh delay (seconds) after successful submission
    • Rate limiting (maximum submissions per IP + time window)
    • Feedback length constraints and reason length/count limits
  3. Save configuration

Permissions

  1. Navigate to People → Roles → Edit for the relevant role
  2. Under DGA Feedback, assign the desired capability:
    • view dga feedback dashboard – view statistics and submissions without edit/delete access
    • manage dga feedback submissions – edit, delete, or bulk delete submissions
    • administer dga feedback settings – change widget configuration and translations
  3. Save the role to apply the permission changes

Block Placement

  1. Go to Structure > Block layout
  2. Add the "DGA Feedback Widget" block to your desired region
  3. Use the block's Visibility settings to choose where it appears:
    • Content types: limit the widget to specific node types (e.g., Service pages only)
    • Pages / paths: specify node/*, /services/*, or other URL patterns to include/exclude
    • Roles / languages: optionally restrict the widget to certain audiences
  4. Save the block placement once the desired rules are configured

Usage

Frontend Widget

The widget displays:

  • Closed State: Question with Yes/No buttons and statistics summary
  • Open State: Full form with reasons, feedback textarea, and optional gender selection
  • Inline Validation: Required fields show inline red error messages (red text under each field) if missing
    • Yes/No selection required
    • At least one reason must be selected
    • Feedback text is required
    • Gender selection is optional (can be left blank, or choose Male, Female, or Prefer not to say)
  • Submitted State: Success message displayed, followed by automatic widget refresh after configurable delay (returns to closed state, updates statistics)

Validation Behavior

  • All validation errors display as red text under the relevant field label
  • Error messages are fully translatable via the Translations form
  • Errors automatically clear when the user corrects the field
  • Form does not submit until all required fields are filled

Admin Interface

Navigate to Admin > Content > DGA Feedback to:

  • View all submissions with filters and pagination
  • Edit individual submissions
  • Delete single or bulk submissions
  • View overall statistics and distribution

Activity

Total releases
6
First release
Nov 2025
Latest release
3 months ago
Release cadence
2 days
Stability
67% stable

Release Timeline

Releases

Version Type Release date
2.0.0 Stable Nov 13, 2025
2.0.x-dev Dev Nov 13, 2025
1.0.2 Stable Nov 6, 2025
1.0.1 Stable Nov 5, 2025
1.0.0 Stable Nov 4, 2025
1.0.x-dev Dev Nov 4, 2025