This project is not covered by Drupal’s security advisory policy.
Webform Element Library lets site builders create named groups of webform elements, for example an address block, a contact block, or a consent block and reuse them across multiple webforms. Each group is stored as a content entity containing a YAML definition of its elements. Because elements are injected from the central library item at render time rather than copied, any change to a library item is immediately reflected in every webform that embeds it.
Features
- Define a group of webform elements once and embed it in any number of webforms.
- Edit the group in one place. Every form that references it updates automatically.
- Embed the same group multiple times in a single form without key or submission-data collisions, thanks to namespaced child keys (
{container_key}__{child_key}). - Internal conditional logic (
#states) keeps working even when the host form has fields with the same name. - External conditions and handlers can target individual fields by their predictable namespaced key.
Post-Installation
- Navigate to Administration » Structure » Webform element library (
/admin/structure/webform-library). - Select Add library item, give it a label, and save.
- Add elements with the Add element button, or paste raw YAML in the Source code (YAML) section.
- In any webform, add a Reusable element element and select the library item to embed.
Access is controlled by the Administer webform reusable elements permission.
Additional Requirements
Requires the Webform module, including its Webform UI sub-module.
Similar projects
Unlike copying or cloning elements between forms, this module keeps a single source of truth: edits propagate to every form that embeds the group, rather than leaving stale copies.
Project information
- Project categories: Site structure
- Ecosystem: Webform
- Created by rkolen on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.