Problem/Motivation

pdv_webform adds configuration fields to three Webform edit forms:

  • the "Personal Data Vault" record-mapping section on the element edit form,
  • the "Vault consumer" selector on the "PDV: map vault records" handler edit form,
  • the "File kind(s)" and save-to-vault options on the pdv_file element edit form.

All of these render outside the tab system, so they appear on every tab (General, Conditions, Advanced, Access) at once instead of only on the General tab.

Steps to reproduce

  1. Add the "PDV: map vault records" handler to a webform, or add a pdv_file element, or add a plain input element and set a Vault record field on it.
  2. Open the element or handler edit form and switch to the Conditions tab.
  3. The PDV fields stay visible below the tab content instead of being hidden with the rest of the General tab.

Proposed resolution

Webform lays these forms out in tabs via WebformFormHelper::buildTabs, which can only move container-capable elements into a tab.

  • Handler form: the "Vault consumer" field is a plain select, and the core Select render element has no #group support (unlike textfield, checkbox and details), so it cannot be relocated into a tab and falls below every tab. Wrap it in a container (which is groupable) and pin the field #parents to the flat consumer key so the value still saves.
  • Element form: the "Personal Data Vault" section is injected in a form alter, after buildTabs has already grouped the existing properties, so it carries no group. Set its #group to tab_general so it joins the General tab.

The pdv_file element fields are added during form build (they were already grouped correctly); they are covered by tests in the same change to guard against regressions.

Issue fork pdv-3605110

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

  • mably committed 316f0516 on 1.x
    Issue #3605110 by mably: Webform PDV configuration fields appear on...
mably’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.