HOLD: Extract BaseRegistrationFormBuilder to share fields across form types#1301
Open
HOLD: Extract BaseRegistrationFormBuilder to share fields across form types#1301
Conversation
…ion forms - Add confirm email field with server-side match validation - Group email, confirm email, and email type in one row - Label as "Email" on short forms, "Primary Email" when secondary exists - Add address type (Home/Work) on same row as street address - Add consent and training interest questions (appear on all forms) - Skip storing confirmation field value in user form submissions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Short, Extended, and Scholarship form builders now inherit from a common base class that provides shared helpers (add_header, add_field) and reusable field sections (basic contact, scholarship, consent). This eliminates duplication and ensures changes to shared fields propagate to all form types. Also fixes three bugs: - Email confirmation key mismatch (primary_email_confirmation → confirm_email) so validation now works for extended forms - workshop_settings → workshop_environments so professional tags get assigned - confirm_email responses no longer stored redundantly in PersonForm Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
What is the goal of this PR and why is this important?
How did you approach the change?
BaseRegistrationFormBuilderwith shared helpers (add_header,add_field) and reusable field sections (build_basic_contact_fields,build_scholarship_fields,build_consent_fields)primary_email_confirmationbut controller validation checkedconfirm_email— confirmation match validation was silently skipped for extended formsworkshop_settingsvsworkshop_environments: Builder createdworkshop_settingsbut the service and helper looked forworkshop_environments— professional tags were never assignedsave_form_fieldsskippedprimary_email_confirmationbut notconfirm_email— short form stored confirmation email unnecessarilynew.html.erbto support 3-column layout (email | confirm | type) when all three fields existUI Testing Checklist
Anything else to add?
AuthenticatedEventRegistrationFormBuildercan inherit the same shared sections and add its own fields.🤖 Generated with Claude Code