feat(forms): add isolated Form A consultation testing

This commit is contained in:
DeCentN2Madness committed 2026-10-29 10:21:45 -07:00
1 parent 6a5e54e130
commit ff80ee516f
25 files changed
+1046 -253

No files matched your search

+21 -2
View File
@@ -54,7 +54,7 @@ Direct-Jotform Form A synthetic EN/ES submission, native thank-you, conditional-
### Landing-route extension — 2026-10-25 / 2026-10-26
The owner has extended this same **isolated-test-only** adapter to `/lp/aba-therapy`, `/lp/aba-insurance`, `/lp/aba-ahcccs`, `/lp/aba-private-pay`, and `/lp/early-intervention`. Those five English landing routes use the fixed URL parameter pair `formContext=landing&language=en`; the contact routes continue to use `formContext=contact` with their fixed page locale. This supersedes their earlier Form B mapping. Physical Form B is retired; other service-consultation journeys are planned Form A `consultation` targets and remain inactive.
The owner has extended this same **isolated-test-only** adapter to `/lp/aba-therapy`, `/lp/aba-insurance`, `/lp/aba-ahcccs`, `/lp/aba-private-pay`, and `/lp/early-intervention`. Those five English landing routes use the fixed URL parameter pair `formContext=landing&language=en`; the contact routes continue to use `formContext=contact` with their fixed page locale. This supersedes their earlier Form B mapping. Physical Form B is retired; the separately documented consultation routes are Form A isolated-test-only placements.
The campaign adapter uses the existing campaign form surface rather than creating a second card. Its native Jotform Submit label is not overridden by Astro. The current sandbox is deliberately limited to `allow-forms allow-scripts allow-same-origin`, which is the minimum anticipated set for Jotform validation and in-frame confirmation. It intentionally does not grant popups, modals, top navigation, downloads, or a feature-policy `allow` list. Owner-authorized synthetic acceptance must confirm the real form's validation, confirmation, and any required in-frame navigation before this sandbox can be accepted for production.
@@ -92,4 +92,23 @@ JF-01 through JF-09, privacy/security review, operations approval, fluent-langua
## 2026-10-28 reconciliation
The current records supersede the earlier Form B mapping: all five named landing journeys use Form A under the seven-route isolated-test or separately approved production gate, and physical Form B is retired. Other service-consultation journeys are planned Form A `consultation` targets; this context is not configured or emitted. The [two-form integration specification](../../reports/phase-9-two-form-integration-specification-2026-10-28.md) defines its fixed planning contract and the separate Form C referral work. The official Jotform JavaScript embed handler is **conditionally acceptable pending targeted verification**; it is not included in this adapter. Any future adoption must first verify its current source, origin and source-window validation, parent-page privileges, URL mutation, network requests, Firefox behavior and all supported error states. Fixed heights remain the current approved architecture until that review is separately accepted.
The current records supersede the earlier Form B mapping: all five named landing journeys use Form A under the seven-route isolated-test or separately approved production gate, and physical Form B is retired. The Form A `consultation` context is owner-reported configured and emitted only by its separate non-indexing isolated-test gate. The [two-form integration specification](../../reports/phase-9-two-form-integration-specification-2026-10-28.md) defines its fixed planning contract and the separate Form C referral work. The official Jotform JavaScript embed handler is **conditionally acceptable pending targeted verification**; it is not included in this adapter. Any future adoption must first verify its current source, origin and source-window validation, parent-page privileges, URL mutation, network requests, Firefox behavior and all supported error states. Fixed heights remain the current approved architecture until that review is separately accepted.
## Consultation isolated-test extension — 2026-10-29
Form A's owner-reported `consultation` context is implemented in Astro for a separate isolated-test path only. It uses the fixed query pair `formContext=consultation` plus `language=en` or `language=es`; the value is selected from a trusted route/locale allowlist and never from visitor input. The three standalone routes are `/client-consultation`, `/es/client-consultation`, and `/schedule-consultation`. The six service drawers are `/aba-therapy`, `/autism-evaluations`, `/learner-social-club`, `/es/aba-therapy`, `/es/autism-evaluations`, and `/es/learner-social-club`.
All of the following are required to render a consultation iframe:
```sh
PUBLIC_AIA_FORMS_MODE=isolated-test
PUBLIC_AIA_FORMS_ENVIRONMENT=isolated-test
PUBLIC_AIA_FORMS_ISOLATED_TEST_APPROVED=true
PUBLIC_AIA_FORMS_LIVE_APPROVED=false
PUBLIC_AIA_FORMS_CONSULTATION_TEST_APPROVED=true
PUBLIC_ALLOW_INDEXING=false
```
The service drawers use a shared bilingual component. In this mode, their visible opener is explicit and keyboard-accessible; the external iframe URL is not assigned until the visitor opens the dialog. The adapter then preserves the fixed height, minimal sandbox, no-referrer policy, localized hosted-form fallback and no-JavaScript fallback. It does not auto-open, preselect a service, use the Jotform resize handler, inspect the child document or install cross-origin messaging.
These nine routes are **not** part of the production resolver. The existing production gate remains exactly seven contact/landing placements, and `PUBLIC_AIA_FORM_A_PRODUCTION_APPROVED=true` cannot activate a consultation route. The reported Jotform configuration requires owner browser acceptance for the visible service question, option text, requiredness, English/Spanish translation, validation, confirmation and privacy boundary. The former diagnostic-evaluation explanatory note is superseded: no such note should be added to Form A or Astro; an AIA client advocate will discuss available options in follow-up.