Skip to content

feat(admin): warn before destructive field-type switch in FormBuilder #2014

Description

@cdcore09

Summary

Changing a field's type in the FormBuilder (e.g., single_choicetext) silently drops type-dependent attributes (the options array). If the user switches back, those options are lost. Currently no warning surfaces.

Requirements

  • Detect when a type change will drop existing data (options, min/max, maxLength)
  • Show a confirmation dialog: "Changing this field's type will discard X options. Continue?"
  • Preserve the attribute union in the Coltorapps store if the user cancels

Context

Plan 4 review follow-up. v2 polish — the current behavior is intentionally destructive (server is the source of truth, attributes irrelevant to the type don't persist), but a one-way silent loss is poor UX.

Files

  • apps/admin/src/components/FormBuilder.tsx (type change handler)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions