nortpoint quizzes screenshot scaled

How We Built a Paginated Quiz Workflow with Cross-Form Data Persistence in WordPress


astute logo scaled

The Project

Northpoint Recovery, a long-standing Astute client, was in the midst of a major digital consolidation effort—combining 20 separate websites into three strategic properties. As part of the redesign for their flagship location, the team identified a critical pain point: their addiction assessment quizzes were broken.

The existing system used a single monolithic Gravity Forms form with hundreds of checkboxes and complex conditional logic attempting to serve all quizzes simultaneously. The scoring mechanism didn’t work, data wasn’t reaching their CRM (Customer Relationship Management system), and the user experience was overwhelming. The goal was to rebuild the quiz system from scratch with a clean, paginated approach that actually functioned as intended.

The Challenges

  • Significant technical debt – The legacy system’s scoring was broken, CRM integration had failed, and the single-form architecture for all quizzes created a maintenance nightmare
  • Cross-form data persistence – The new architecture required passing quiz response data from a static quiz interface into a Gravity Forms lead generation form, then forwarding results to a dynamic Thank You page—all while preserving state through page refreshes

The Process

The Data

The quizzes themselves are straightforward: 10-30 yes/no questions designed to assess substance use, mental health needs, or treatment readiness. Northpoint maintains 15 distinct quizzes across these three categories, all following the same binary question format.

The interesting piece is how quiz data moves through the workflow:

Quiz responses are tracked in real-time as users progress. Each “yes” response is recorded along with the question text itself.

Score calculation simply counts total “yes” responses—this is a secondary lead generation tool, not a diagnostic instrument, so weighted scoring wasn’t necessary.

Data handoff happens in stages:

  1. Static quiz form (built with ACF repeater fields) tracks responses in browser localStorage
  2. Upon completion, “yes” count and question text pass into hidden fields in a Gravity Forms contact form
  3. Contact submission forwards data to the Thank You page via URL parameters
  4. Thank You page receives quiz ID and “yes” count to display appropriate messaging

Final destination – Form submissions route through CallTrackingMetrics (CTM), then ultimately into Salesforce for the client’s marketing and intake workflows.

The Design

The interface uses conditional visibility to manage the multi-stage workflow. Quiz instructions display initially, then individual questions appear one at a time. Progress through the quiz shows/hides navigation elements appropriately—the final question presents a “Submit” button that transitions from the quiz interface (Form 1) to the contact form (Form 2).

The visibility logic for Form 1 and Form 2 is inverted: when one is shown, the other is hidden, creating a seamless single-page experience despite using two distinct form systems.

The Thank You page displays personalized results based on score ranges. For a 16-question quiz, messaging might break into ranges: 0-3, 4-8, 9-13, and 14-16 “yes” responses. The appropriate message is pulled from post meta based on the quiz ID and score passed via URL parameters.

The Development

Pagination System

With 100% yes/no questions, the team implemented single-question pagination for optimal mobile experience and reduced cognitive load. Progress tracking uses localStorage rather than URL parameters, allowing users to refresh the page without losing their place or previous responses. If someone completes the quiz, reaches the contact form, and refreshes their browser, they immediately see Form 2 with their quiz data intact.

A storyboard of screenshots showing the progression through the quiz to the Thank You page, with a dynamic score rendered.
Northpoint Recovery quiz storyboard.

Data Flow Architecture

The static quiz form is built using ACF (Advanced Custom Fields) repeater fields, allowing easy management of questions per quiz. As users answer questions, JavaScript tracks:

  • Total “yes” responses
  • Text of questions answered “yes”
  • Current question position

Form Integration

When users complete the quiz, the transition to Gravity Forms happens seamlessly. Hidden fields in the contact form receive:

  • “Yes” count
  • List of questions answered affirmatively
  • Quiz identifier

This allows the CRM to receive both lead contact information and assessment context in a single submission.

Thank You Page Logic

The Thank You URL structure follows this pattern:

/thank-you?action=quiz&yes_count=14&quiz_id=1234

The page reads these parameters and queries the appropriate quiz post to retrieve range-based result messaging. If someone scores 14 out of 16, the system identifies which range (likely 14-16) applies and displays the corresponding assessment message and next steps.

State Persistence

localStorage handles all client-side state management:

  • Current question number
  • Array of responses
  • Quiz completion status
  • Form transition state

This approach balances user experience (no lost progress) with technical simplicity (no server-side session management required).

The Finished Product

The quiz system launched in Fall 2025 and is currently live across Northpoint Recovery’s flagship website. All 15 quizzes—spanning substance use assessment, mental health screening, and treatment readiness evaluation—use this unified workflow.

The Future

The system works as designed and meets all client requirements. While there’s always potential for expansion or additional features, the current implementation is solid and sustainable. Any future modifications would need careful consideration to avoid introducing complexity that might compromise the clean architecture that replaced the original technical debt.