Skip to main content
Version: v1 (Current)

Registration Forms — Platform Architecture

Registration spans project form/schema configuration, attendee identity, portal access, response persistence and optional notification/login work. This guide is for platform contributors. For ordered App setup, mode/duplicate tables and response recovery, start with Registration App Integration.

Implementation map​

LayerCurrent sourceResponsibility
Project resourceProjectForm, RegistrationFormSettingsForm/schema, settings and project bindings
Portal entryPortal/RegistrationFormControllerDisplay, submission, resume and advisory checks
API entryApi/Ver1/RegistrationFormApiControllerDefinition, mode-routed submission and identified self-update
DisplayRegistrationFormViewService, AttendeePrefillServiceGraph, resource options, saved profile and condition context
ValidationRegistrationSubmissionValidatorLegacy field rules and visible graph validation
SubmissionRegistrationFormService, AttendeeServiceActor/mode routing, mapping and attendee/response persistence
ResumeFormResumeService, FormResumeSessionPartial data, expiry and requested link delivery
Access codeAccessCodeGate, RegistrationFormAccessCodeCode validity and successful-use consumption
Login/redirectRegistrationAuthController, RegistrationTokenService, PostRegistrationRedirectServiceConditional login handoff and configured destination

These are class names relative to the platform's controller/service/model namespaces. Portal and API entry points share services but have different request/session behavior; do not infer identical gates or login effects from a shared form slug.

Storage and configuration​

ProjectForm and registration settings​

A registration form uses form_type=registration, is_active, its project ID and schema version. Legacy sections/fields and v2 root_config, cards_config, elements_config need different validation/display handling. ProjectForm::fields() is a HasMany relationship; do not copy the older HasManyThrough declaration from this guide.

registrationSettings() is a one-to-one relation to registration_form_settings; registrationAccessCodes() is one-to-many. Settings cover registration mode, duplicate strategy, attendee type scope/selection, resume retention/contact, access-code requirement, group assignment, confirmation template and redirect/prefill behavior. Model constants and validation rules define accepted setting values; these descriptions are not executable database DDL or a declaration that every stored option overrides newer schema behavior.

In particular, layout-engine duplicate update/prompt are hardened to rejection; type assignment is server scoped; and layout-engine post-submit controls can supersede legacy redirect settings. Review the integration guide and the applicable service path before extending the dashboard's options.

Responses, values and identity​

Successful create/update flows record an AttendeeFormResponse and related response values. The response carries project/form/attendee identity, completed status, request IP/user agent and available attribution/session/visitor identifiers. Submitted arrays are encoded for saved values, booleans become 1/0, and known form-field slugs resolve a form_field_id where available. A saved response is not the same resource as the attendee's current profile or a resume session.

Before response/metadata persistence, reserved credential/confirmation keys and encrypted attendee-field slugs are stripped by the shared helper. Uploaded file objects are skipped in ordinary JSON/value persistence. The implemented avatar path attaches the uploaded headshot to the attendee; that is not a generic pipeline for arbitrary registration file fields. Keep storage, validation and displayed asset support aligned when adding an upload field.

Access codes​

RegistrationFormAccessCode stores form identity, code, active state, optional maximum uses and current uses. AccessCodeGate looks up an active code on that form and checks its remaining count. A successful submit consumes a use separately; explicit self-update is a different path. The current model/gate does not establish the former claim that all supplied codes are case-insensitive or stored uppercase. Test the actual submitted value and configured database behavior.

FormResumeSession​

form_resume_sessions associates a form/project and contact value/type with a generated UUID token, partial form_data, last section/activity, progress estimate, lifecycle status, expiry and link-request counters. Model creation/update checks the form/project relationship. Statuses are in-progress, completed, expired and abandoned; completion sets progress to 100. These model helpers do not establish provider delivery or attendee identity ownership.

Submission and validation services​

RegistrationFormService​

handleSubmission() is the mode-routing entry point. It discards a foreign-project actor, resolves whether this is creation or an identified update, derives type/unique-key scope and validates before delegating. An update-only guest returns login_required; new_only still uses create/duplicate handling even for a signed-in attendee. See the integration guide for the mode table and separate explicit /me behavior.

The create path checks duplicates before its attendee-creation transaction. Within the transaction it resolves the project type, separates attendee fields from form metadata, creates the attendee, attaches a supported headshot, assigns only groups owned by the form's project, completes an applicable resume session, records the response and conditionally requests confirmation work. Duplicate rejection, existing-attendee reporting and legacy duplicate updates take different branches; they are not all new registrations.

The update path uses the identified target, applies layout-engine readonly-on-update rules, updates profile/avatar, completes an applicable resume session and records a new response within its transaction. The create path's group assignment and confirmation call are not automatically repeated by that update method. A missing/error reply does not establish that no write occurred; reconcile the actual attendee/response before retrying.

separateFormData(array $formData, Collection $attendeeFields) maps keys known to the project's attendee-field definitions into profile data, puts other non-type keys into metadata and skips uploaded-file objects. It does not accept the older documented form/type arguments. When adding fields, inspect this mapping together with sensitive-value stripping and final response values.

RegistrationSubmissionValidator​

Legacy input passes through validate($input, $form) and getFieldTypeRules(); empty strings are normalized to null. Layout-engine input uses validateGraph() with graph/answers/attendee context, project/ignore-self identity scope, type-selection scope and create/update context. It derives the applicable visible set and validates the supported required/type/unique/confirmation rules while dropping condition-hidden answers.

Put new validation in the shared validator and graph paths used by both create and update. Adding a rule only to a portal controller or a browser component can leave API/self-update behavior different. Test conditional visibility, hidden defaults, immutable-on-update fields, invalid inputs and project/type uniqueness explicitly.

Display and prefill​

RegistrationFormViewService::buildProps() serves the native graph for v2 and translates legacy forms into the graph representation. It hydrates attendee-bound options and returns mode/authentication, allowed types, prefill/condition context, resume data, strings, style/plugin and asset URLs. The API show path also converts graph vocabulary for its supported response contract. Do not reintroduce a blanket browser m2ConvertToM1 step that overwrites the native graph.

Prefill is an input/display convenience, not authorization. Keep actual actor and saved readonly values authoritative, and test the resulting props and mutation separately.

FormResumeService​

Location: app/Services/Registration/FormResumeService.php

This service persists partial progress and requests delivery of a resume link. It is separate from attendee registration and authentication: a saved session or working resume token does not prove the holder owns an existing attendee identity.

MethodRelevant contract
saveProgress($form, $contactValue, $contactType, $formData, $sectionId, $ipAddress, $userAgent)Strip supported credential fields, then find/create by form, contact value, contact type and in_progress status
findByToken($token, ?ProjectForm $form = null)Require matching token, in-progress status and expiry strictly after now; optionally constrain to a form
sendResumeLink($session)Check stored send count/time, request notification delivery and update counters if the call succeeds
cleanupExpired()Mark in-progress rows with expiry before now as expired; does not delete their saved data
getResumeUrl($session)Build the named portal resume route for the token

Saving, merging and expiry​

Creation sets expiry from resume_retention_hours, falling back to 24 hours. An existing session merges new values into saved form_data, preserves an omitted last-section value and updates activity/progress. Omitted answer keys are not deletions. Password/credential values handled by the registration stripping helper are excluded and must be re-entered; do not use resume storage as a password vault or assume arbitrary sensitive profile data is removed.

Saving again does not extend expires_at. The find/create predicate also does not exclude expired in-progress rows: a save after expiry can reuse the same row and token, while findByToken() still rejects it. The local fixture reproduces this condition. Once an operator's configured cleanup marks that row expired, a later save can create a new in-progress session. Confirm the target deployment's cleanup/recovery behavior rather than repeatedly resending an unusable token or promising a sliding retention window.

Completion percentage is a heuristic based on nonempty submitted values and the form's field count; creation and later updates do not calculate it identically. It is not graph validation, a unique-learner metric or an authoritative readiness check. Final submission must still validate the relevant visible fields.

The service rejects sends after five accepted requests per session or within five minutes of the previous accepted request. Its count/time checks and update are separate operations, so these are service limits to verify under concurrency, not an atomic distributed quota.

Email uses the mail notification route; phone uses the configured SMS route/channel. FormResumeLink implements ShouldQueue. A successful notification call and incremented counter mean delivery was requested, not that a queue worker/provider delivered the message. The method returns false for both its limits and caught notification exceptions; callers cannot diagnose every false result as throttling alone.

The portal save-progress action checks the form group gate and resumable setting, saves, then attempts link delivery. It can report saved progress and return the session token even when no link was sent. Its fallback text mentions rate limiting, but delivery exceptions also produce the same false result. The separate request-resume-link action looks up an unexpired in-progress contact session and maps a false send result to 429. Verify queue/provider processing through the private delivery procedures before attributing every 429 or missing email to the reader.

Resume tokens grant access to stored partial data through the resume flow, subject to the form's display gates. Treat the URL/token as sensitive and avoid placing it in analytics, screenshots or public support records. The portal resume action first resolves the unexpired session, then renders its associated form; it does not turn that token into a general attendee login credential.

Controllers, routes and authentication​

Portal routes​

routes/portal/app.php is registered on portal hosts through the portal route provider. The current logical paths below have no extra /portal/form prefix in that file. Resolve named routes/serving portal context rather than hardcoding an old path.

PathMethodAction
/register/{form}GET / POSTShow / submit
/register/{form}/check-uniquePOSTAdvisory uniqueness check; submit rechecks
/register/{form}/check-access-codePOSTAdvisory code check
/register/{form}/save-progressPOSTSave partial progress and attempt a resume link
/resume/{token}GETResolve session, then render its form
/request-resume-linkPOSTRequest another link for an active contact session
/auth/auto-loginPOSTInvoke the registration-token login controller

Portal display/submission and the auxiliary actions have their own form/group/active/resumable validation. Named throttles appear on selected actions such as uniqueness/code checks and auto-login; do not infer the same quota for every route. Verify the target portal's actual audience and credential behavior.

Project API and dashboard​

The API's /registration-forms/{formSlug} group provides GET definition, POST /submit and PUT /me beneath the configured API/project prefix. See the integration guide for status/identity and access-code differences. Portal URLs, API operations and dashboard CRUD are distinct contracts.

Dashboard form policy inherits BaseDashboardPolicy; the permission map assigns form view operations to view_project_forms and create/update/delete operations to manage_project_forms. Project/team policy context and installed App dependency actions remain separate from attendee login. Check the actual principal and operation when diagnosing a denied request.

Auto-login and redirects​

Portal submit can log a newly created guest attendee into the portal session server-side when the linked authentication method enables it and portal context is present. It returns logged_in/auto-login information and a redirect; it does not switch an already-authenticated actor through that branch. The API creation path instead can return a registration token for the supported handoff. Updated/existing outcomes do not take those creation-only branches.

RegistrationAuthController::__invoke() validates the posted token and attendee ID, checks that the attendee belongs to the current portal project, logs into the portal guard and resolves a configured/fallback redirect. The current route is /auth/auto-login, not the older /auth/registration-login example or a loginWithToken() method.

RegistrationTokenService signs an attendee ID/timestamp with the application key and checks its signature/age; its maximum age constant is 900 seconds. It is a separate format from a resume UUID, OTP, reader credential or API key. Its verifier is stateless: do not describe it as a stored, consumed single-use token or infer replay/future-time protections beyond its actual checks. Keep the token out of logs and analytics and test handoff behavior in the intended deployment.

Redirects go through PostRegistrationRedirectService; legacy form redirect settings, linked authentication-method settings and fallback navigation have separate precedence. Layout-engine post-submit controls own their flow rather than inheriting all legacy form redirect options. Validate the final destination and serving host in the actual App.

Events and downstream work​

recordResponse() dispatches new AttendeeFormResponseCreated($response). The event derives model, projectForm, attendee ID and project ID from that response; its constructor does not accept a separate form argument. It implements the admin-workflow trigger contract and ShouldDispatchAfterCommit. Its reference data includes response/form/project notification references, and the platform event subscriber registers a form-response handler.

An event class or registration success is not proof every webhook, workflow or analytics destination completed. Subscribe through the actual platform event/workflow mechanism and verify idempotency/retry behavior of the integration you add; do not copy fictitious listener classes as if they were shipped subscriptions.

Creation's optional confirmation helper requires a ready notification template and a current template version, then dispatches SendCustomNotificationJob. A configured boolean alone does not guarantee a job was dispatched or delivered. Resume-link notifications are a separate queued path described above. Detailed queue/provider recovery belongs in private operator procedures.

Frontend implementation​

The portal page is resources/js/Portal/Pages/RegistrationForm.vue, backed by resources/js/Store/gxpFormStore.js and its form-submission composable. It renders the supplied graph through the current form components, keeps form/error/processing state in the store, supports type selection and schema-appropriate duplicate handling, and presents resume/access-code state.

When resumable, the page starts a 30-second interval and only saves if its configured/default contact field has a value; save failures are logged. The interval is not a guarantee that every keystroke is durably stored or that a resume link arrived. Clear/unmount and error/reconnect behavior need browser acceptance.

useRegistrationAutoLogin navigates when portal submit already established a session, or uses the token handshake for supported responses that contain a token. Test those branches separately; displaying a success page does not prove session cookies or iframe behavior work.

Extension and verification workflow​

For a new duplicate behavior, update model constants/allowed values, service handling, layout-engine identity hardening and admin/App UI together. Define the authenticated write target and recovery behavior before adding a confirmation prompt. A name such as merge does not implement an authorized merge.

For new validation or fields, update the shared legacy/graph validator, mapping, sensitive-value handling, schema display and API representation. For new code features such as dates, change persistence and AccessCodeGate plus every relevant advisory/submit path; merely adding columns or a controller-only condition is insufficient.

Run PHP in Docker. The repository's ./bin/gxp test:unit, test:feature and test:js entry points use its test stacks; inspect the current tier/configuration before selecting cases. Relevant current files include:

  • testing/Integration/Services/Registration/RegistrationFormServiceTest.php for mode, credential stripping, type and graph behavior.
  • testing/Integration/Services/Registration/RegistrationFormViewServiceTest.php for display/prefill projections.
  • testing/Integration/Services/Registration/RegistrationFormServiceAttributionTest.php for response attribution.
  • testing/Feature/Api/RegistrationFormApiTest.php and portal feature tests for HTTP behavior.

Local source-matched service/view fixtures are evidence for their cases, not full deployed acceptance. Test allowed/excluded and foreign-project principals, legacy and layout-engine paths, duplicates, scoped types, invalid/hidden/readonly fields, concurrent access-code use, expired resume tokens, response-loss recovery, uploads, login/redirect and actual downstream delivery. Include native graph and installed App behavior in acceptance.

For troubleshooting, start with the project/form/schema/mode and serving route; inspect actor and audience context before changing settings. Then distinguish validation/duplicate/code failures from persisted attendee/response state, queued work and browser login state. See Registration App Integration for response diagnosis and the resume section above for expired-session recovery.