Skip to content

[BUG]: Allow creating templates when fields have identical names #562

Description

@marcvergees

⚡️ Describe the Bug

When creating a template, template creation fails if two or more fields have the exact same name (e.g., two fields both named "email"). The UI shows an error and the template cannot be created. This should not be a hard failure — field display names can legitimately be identical, and uniqueness should be enforced on internal IDs rather than on human-friendly names.

👣 Steps to Reproduce

  1. Go to Templates → Create Template.
  2. Add a field with the name email.
  3. Add another field with the name email (exact same name).
  4. Save / Create the template.
  5. Observe an error preventing the template from being created.

📉 Expected Behavior

The template should be created successfully. Display names (field names shown to users) may be identical; system should ensure unique internal identifiers for fields. If identical display names are not allowed, the app should present a clear validation message and offer a way to resolve (auto-suffix, require unique ID, etc.).

🖥️ Environment Information

  • OS: Web / cross-platform
  • Browser: (e.g. Chrome, Firefox)
  • FireForm branch/version: development

📸 Screenshots/Logs

If available, attach the UI error message shown when saving the template — e.g. "Cannot create the template".

🕵️ Possible Fix

  • Allow duplicate display names and rely on unique internal field IDs (generated keys) to differentiate fields.
  • Update validation to check uniqueness on the internal identifier rather than the display name.
  • Improve the error message and provide options (auto-rename or require an ID) if uniqueness is needed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status
No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions