Skip to content

Drupal 8.module to managing third-party surveys via JS embeds or HTML with links to surveys

Notifications You must be signed in to change notification settings

wfp/survey_manager

Repository files navigation

Survey Manager

Module for managing third-party surveys in Drupal 8.

Installation

Download and enable it as a regular module.

How it works

This module uses Block API, every survey is just a specific type of block.

This gives you flexibility of block visibility settings. You can control how, where and who will see the survey.

There are 2 types of surveys:

Embed survey

This is a type of survey where you can put/embed third party JS scripts (e.g. SurveyMonkey). You put Embed surveys in some region but they wont appear in any of them, their contents of embed code will be printed at the bottom of the page as a script.

HTML Survey

This is just a regular block, it has a field for storing whatever HTML you want and it will be printed out as a regular block in regions or as a filter in any content.

Usage

After installing this module you will see Survey Manger link under Structure menu. This is where all your surveys reside.

You can create or edit surveys from that page.

Usage of filter [survey:id]

This module implements filter for text formatters, you can enable this filter from your text formmatter configuration page. After enabling this filter you can use it in your content. e.g [survey:123] where 123 is the id of the survey you want to embed in your content. This Filter works fro HTML Surveys.

Developer Guideline

# Install development dependencies
composer install

# Run PHP code audits
composer run phpcs

# Run PHP Copy-Paste detector
composer run phpcpd

About

Drupal 8.module to managing third-party surveys via JS embeds or HTML with links to surveys

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages