Skip to content

Form definition storage #2

Closed
Closed

Description

@n4ff4h

Migrations and models for forms, versions, sections and fields, so published forms are immutable and entries keep pointing at the version they were filled with.

Activity

  1. added
    next-genNext-gen Javaabu packages
    featurePackage feature from the spec
    on Nov 4, 2026
  2. n4ff4h commented on Nov 5, 2026

    @n4ff4h
    CollaboratorAuthor

    Done. Definitions live in forms, form_versions, form_sections and form_fields (fields of a repeating group have a parent_id).

    Decisions:

    • Drafts and published versions. A form has at most one draft. Publishing freezes it, and published versions and their sections and fields refuse changes (FormBuilderException). Entries reference form_version_id with restrictOnDelete.
    • Keys, not ids. The builder addresses sections and fields by key (group.key inside repeating groups). Draft rows are rewritten on every change and ids change, but URLs stay stable.
    • The definition is the interchange object. FormDefinition/Section/Field/Condition are what the builder, seeders, imports and the assistant all produce. FormVersion::replaceStructure() stores them, and a hash makes sync() idempotent.

    Docs: docs/basic-usage/defining-forms.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurePackage feature from the specnext-genNext-gen Javaabu packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions