feat(intake): contact info toggle + delete bug fix#3410
Merged
gorkem-bwl merged 6 commits intodevelopfrom Feb 25, 2026
Merged
Conversation
## Changes ### Contact info toggle - Add `collectContactInfo` boolean to `FormDesignSettings` (default: false for new forms) - Add checkbox toggle in the form builder settings panel - Show/hide contact info preview in the form canvas editor - Conditionally render name/email fields on the public intake form - Skip email validation on the backend when toggle is off - Guard approval/rejection email sends when submitter email is null - Make `submitter_email` and `submitter_name` nullable in the database - Backward compatible: existing forms without the field default to collecting contact info ### Delete form bug fix - Hide delete menu item for non-draft forms (only drafts can be deleted) - Surface actual backend error message instead of generic "Failed to delete form" - Fix MUI Fragment error in Menu by using keyed arrays ### Security fix - Discard user-supplied email/name when `collectContactInfo` is off to prevent data storage via direct API calls ## Migration - `20260224100203-make-submitter-fields-nullable.js`: drops NOT NULL on `submitter_email` and `submitter_name` across all tenant schemas - `createNewTenant.ts` updated to match
…t-toggle-and-delete-fix
The Playwright E2E tests fail consistently in CI because the test user is not seeded, causing login to stay on /login. This blocks all PRs. Removes the E2E workflow, test files, Playwright config, and dependencies. Existing vitest unit tests are unaffected.
This reverts commit 3cc015e.
…modals ## Changes - Allow deleting archived forms (previously only drafts could be deleted) - Backend: block only active forms from deletion, allow draft + archived - SQL query: status IN (draft, archived) instead of status = draft - Add archive confirmation modal instead of instant action - Fix StandardModal double border line when no children are rendered - Set maxWidth="440px" on delete and archive confirmation modals ## Benefits - Archived forms can be fully removed including their public links - Archive action now requires explicit confirmation - Confirmation modals are compact and properly styled
…t-toggle-and-delete-fix # Conflicts: # Clients/src/presentation/pages/PublicIntakeForm/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
null. Existing published forms default to showing contact info for backward compatibility.collectContactInfois off, the backend now discards any user-supplied email/name to prevent data storage via direct API manipulation.Files changed
types.ts— addedcollectContactInfotoFormDesignSettingsindex.tsx— checkbox toggle,FormCanvas.tsx— contact info previewPublicIntakeForm/index.tsx— conditional rendering,SubmissionSuccess.tsx— conditional email rowIntakeFormsListPage.tsx— delete visibility, error extraction, Fragment fixintakeForm.ctrl.ts— conditional validation, email guards, security fixi.intakeSubmission.ts,intakeSubmission.model.ts— nullable submitter fieldsmake-submitter-fields-nullable.js, updatedcreateNewTenant.tsTest plan
collectContactInfoin settings) — verify contact section still shows (backward compat)npm run build && npx sequelize db:migrate