Provide user selectable interest groups as Webform predefined options

Created on 28 February 2019, over 5 years ago
Updated 26 November 2023, 12 months ago

Problem/Motivation

Webform Mailchimp allows admins to select the interest groups to which users will be subscribed for a Webform by configuring them in the Webform Mailchimp handler. This means all users are subscribed to the same, preselected interest groups on every form submission.

Currently, there exists no method to expose interest groups as fields on Webforms which would allow users to select their preferred interest groups themselves.

Proposed resolution

This patch provides Mailchimp interest groups as Webform predefined options. Admins can then add fields to their Webforms that use these predefined options, and the selections made in these fields by the user map to groups in Mailchimp on form submission.

This patch builds on the idea introduced by daniyarseferov in List Interest Groups not showing on Webform Block #6 .

Additional benefits

  1. Webform predefined options are editable, so admins can choose which groups should be included in Drupal without having to edit the groups in Mailchimp.
  2. Groups can be imported/updated from Mailchimp using the UI.
  3. Multiple groups attached to the same Mailchimp List can be used separately in Webforms.

User interface changes

  1. A new form is added allowing admins to import and/or update predefined groups options at /admin/structure/webform/config/options/import-webform-mailchimp-options.
  2. The form in 1 is available from a new link "Import Mailchimp Groups options" added to the Webform options configuration page at Structure->Webform->Configuration->Options.
  3. A new button "Fetch Mailchimp Groups" is added to the predefined options edit form allowing admins to fetch any updates to an interest group from Mailchimp.
Feature request
Status

Needs work

Version

5.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024