Support dynamic labels (<output>) in groups
- Dominant language
- TypeScript
- Stars
- 38
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Currently, Web Forms does not support dynamic group labels. A group `` element containing `` expressions that reference fields within the group is not evaluated reactively.
Example form: [dynamic_label.xml](https://github.com/user-attachments/files/30046437/dynamic_label.xml)
XForms spec: The spec defines `` as a reactive element where its value expression should be re-evaluated whenever its dependencies change, regardless of context (group or repeat).
Behavior across renderers:
- Web Forms: No support — label is not rendered dynamically
- Enketo: No support
- ODK Collect: Partial — label updates only when navigating away from and back to the group (page re-render), not while typing
Dynamic `` in repeat labels is already supported in Web Forms. The question is whether we want to extend that support to plain (non-repeat) groups.
### User Stories
- As a data collector filling out a form,
I want group labels that include expressions to update as I enter data,
so that I can see contextual information (e.g., a respondent's name) reflected in the group header without having to navigate away and back.
---
### Additional Notes
-
---
### Related Issues
-
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with dynamic_label.xml and the existing Web Forms behavior for dynamic in repeat labels. Compare how dependency changes update repeat labels with how plain group labels render. Done means group labels re-evaluate while referenced fields are edited, matching the stated XForms behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100