Skip to content

Outside USA? box for license issuing states (plus country) and every state dropdown - #2846

Open
maebeale wants to merge 8 commits into
mainfrom
maebeale/professional-license-state-form
Open

maebeale wants to merge 8 commits into
mainfrom
maebeale/professional-license-state-form

Conversation

@maebeale

@maebeale maebeale commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 5 Inspect 🔬 migration + param handling across 7 forms (public, registrant, admin)

Registrants licensed outside the USA couldn't enter their state or province — every state field was a US-only dropdown, and a saved non-US value rendered blank so the next save wiped it.

  • "Outside USA?" — a native <details> link under each state dropdown; opens a Province / State box. No JS, no page reload, nothing else on the form lost.
  • Typed value wins over the dropdown when filled. Opens automatically on a saved value the dropdown can't show.
  • Licenses get issuing_country (new nullable column, no backfill). Shown as "Ontario, Canada".
  • Where: person edit licenses + addresses, CE callout on the ticket, admin license + CE registration pages, work-address change request, and every _state question on public/registration/callout forms.
  • Gotcha: public-form state selects are no longer browser-required — someone abroad leaves the dropdown blank. Server-side required validation still runs on the merged answer.
  • ce_license_picker (existing controller) now fills the box + country when switching licenses.
  • Paired country questions: a form's <prefix>_country question now sits inside its <prefix>_state question's box.
    • US registrants never open it, so a blank paired country beside a US state saves as "United States".
    • The registration CE section gains "In which country was your license issued?". Smart field settings documents both endings.
    • Still listed as its own answer on the submission views — only the form hides it.
  • Licenses index: a new Location filter matches the issuing state/province/country or the holder's city/state.
  • Prod: existing forms need the CE country question added. A console script (DRY_RUN) is in the session notes.
  • Dev seed: the flagship's Feedback surveys callout now delivers a short post-event survey with a state question, so callout forms are testable from any flagship ticket.
image

🤖 Generated with Claude Code

@maebeale maebeale changed the title Outside USA? text box for license issuing states and form states Outside USA? box for license issuing states (plus country) and every state dropdown Oct 25, 2026
@maebeale
maebeale marked this pull request as ready for review October 25, 2026 13:46
maebeale and others added 8 commits October 25, 2026 10:15
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A registrant licensed in Ontario had no way to say so: every state field was a
US-only dropdown, and a saved non-US value rendered blank so the next save wiped
it. An "Outside USA?" <details> box beside each dropdown takes a typed state and
wins when filled, so nothing a person already entered is lost. Licenses also
record an issuing country, since a province alone doesn't place a license.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Outside the USA a province is the likelier answer, so name it first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
No dev seed delivered a form on a ticket callout: the Feedback surveys callout
links its survey forms only when created, and no survey form existed yet. A short
post-event survey with a state question now opens on it, so callout forms and the
Outside USA box can be tried from any flagship ticket.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…try at registration

A province alone doesn't place a license or an answer, so a <prefix>_country
question now rides inside its <prefix>_state question's Outside USA box, and the
CE section asks which country issued the license. A US registrant never opens the
box, so a blank paired country beside a US state records the US. The Smart field
settings page now explains what the _state and _country endings do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Admins looking for licenses from a region had to scan the whole list. A Location
box now matches where a license was issued and where its holder lives, taking a
US state by name or code, a province, a country, or the start of a city.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…v survey

A license picked from the US-state dropdown named no country, unlike a form answer
beside a US state, which records the US — so licenses now default the same way.
Dev databases that already held a post-event survey never got its location
questions or an open callout to try them on; the seed now adds both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
grid_span_class is read by the answer-display pages as well as the form
pages, so hiding the paired country field there dropped its recorded
answer from the registration confirmation page — including the United
States now filled in automatically. Skip the field where the form is
asked instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@maebeale
maebeale force-pushed the maebeale/professional-license-state-form branch from b68bcf8 to 3e323a7 Compare October 25, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant