⚡️ Describe the Bug
When creating a template, the UI blocks creation if a field's name matches the name of an auto-inserted field. Auto-inserted fields (for example, placeholder fields generated by the editor or import process) can share names with other fields and are not meant to be treated as conflicts. Currently the validation treats name equality as a hard block and prevents saving the template, causing unnecessary interruptions.
👣 Steps to Reproduce
- Open the template editor and add a field (or import a template) that auto-inserts a placeholder field with a given name (e.g. "email").
- Add another field or edit an existing field that ends up having the same name (either manually or via auto-insert).
- Attempt to save/create the template.
- Observe that the save is blocked and an error is shown indicating a duplicate field name.
📉 Expected Behavior
The template editor should not block saving when names match auto-inserted/placeholder fields that are harmless duplicates. Validation should only block genuine conflicts that would cause runtime issues (e.g., identical field IDs or duplicated required input names that affect submission). Auto-inserted placeholder fields should be ignored for duplicate-name blocking, or duplicate detection should be based on stable identifiers rather than the display name.
🖥️ Environment Information
- Repo: fireform-core/fireform-frontend
- Area: Template editor / field validation
📸 Screenshots/Logs
(none provided)
🕵️ Possible Fix
- Change duplicate-field validation from name-based to ID-based (use unique field IDs instead of display names).
- If name-based checks are required, ignore auto-inserted/placeholder fields in the duplicate detection logic (mark them with a flag and skip them).
- Provide a non-blocking warning for duplicate display names instead of preventing save.
- Add tests covering template creation where auto-inserted fields share names with user-created fields.
⚡️ Describe the Bug
When creating a template, the UI blocks creation if a field's name matches the name of an auto-inserted field. Auto-inserted fields (for example, placeholder fields generated by the editor or import process) can share names with other fields and are not meant to be treated as conflicts. Currently the validation treats name equality as a hard block and prevents saving the template, causing unnecessary interruptions.
👣 Steps to Reproduce
📉 Expected Behavior
The template editor should not block saving when names match auto-inserted/placeholder fields that are harmless duplicates. Validation should only block genuine conflicts that would cause runtime issues (e.g., identical field IDs or duplicated required input names that affect submission). Auto-inserted placeholder fields should be ignored for duplicate-name blocking, or duplicate detection should be based on stable identifiers rather than the display name.
🖥️ Environment Information
📸 Screenshots/Logs
(none provided)
🕵️ Possible Fix