EXTRA: Allow anonymous public form submissions - #2350
Draft
maebeale wants to merge 1 commit into
Draft
Conversation
maebeale
added a commit
that referenced
this pull request
Aug 23, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Public standalone forms required name+email to build a Person, so a form meant for anonymous feedback couldn't accept a response. Add a per-form "Allow anonymous submissions" toggle: when on, the identity questions stay on the form but become optional, and a blank-identity submission is recorded with no Person. - form_submissions.person_id is now nullable; FormSubmission#person optional - PublicFormSubmission records a person-less submission (and skips the submitter confirmation email) when the form allows anonymous - identity questions render optional and skip required validation via Form#requires_answer?/#optional_identity_field? - admin submission views and the team FYI email handle a nil person Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
force-pushed
the
maebeale/hidden-questions-block-form-submission
branch
from
August 23, 2026 21:27
103c63a to
3b0d5d4
Compare
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.
🤖 suggested review level: 5 Inspect 🔬 nullable FK + person-optional model change with wide nil-person blast radius
Why
Public standalone forms required name + email to build a
Person, so a form meant for anonymous feedback couldn't accept a response (it errored with "needs a name and email question").What
Per-form "Allow anonymous submissions" toggle (admin-set, in the public-link settings).
When on
Person.Personis found/created as before).Data / model
form_submissions.person_idis now nullable;FormSubmission belongs_to :person, optional: true.person_id.Nil-person handling
OtherResponses::CaptureFromSubmissionno-ops (responses are person-owned).Seams
Form#requires_answer?/#optional_identity_field?centralize the identity-optional rule; used by the controller validation and the field partial (newrequired:local, defaults tofield.requiredso event-registration callers are unchanged).Notes
current_user&.person; left untouched (out of scope).