When a Single Page Is Not Enough
Complex data entry workflows, like employee onboarding, insurance claims, or loan applications, often require more fields than fit comfortably on a single page. Multi-step wizards guide users through a sequence of focused pages, collecting information progressively and validating each step before moving to the next.
Architecture Options
APEX supports two approaches for wizards. The multi-page approach uses separate APEX pages for each step, with navigation buttons that branch between pages. The single-page approach uses a single page with multiple regions shown and hidden using Dynamic Actions and a step indicator. Each has trade-offs:
Multi-page wizards are simpler to build, naturally support the browser back button, and keep each page lightweight. Single-page wizards feel more responsive because there is no page reload between steps, but they require more JavaScript and can become complex to maintain.
Multi-Page Wizard Pattern
Create a page for each wizard step. Use a shared application item (like G_WIZARD_ID) to track the current record being created across pages. Add Previous and Next buttons with branching logic:
-- Step 1: Basic Information (Page 10)
-- After Submit Process: Save Step 1 Data
BEGIN
IF :G_WIZARD_ID IS NULL THEN
INSERT INTO applications (applicant_name, email, phone)
VALUES (:P10_NAME, :P10_EMAIL, :P10_PHONE)
RETURNING application_id INTO :G_WIZARD_ID;
ELSE
UPDATE applications
SET applicant_name = :P10_NAME, email = :P10_EMAIL, phone = :P10_PHONE
WHERE application_id = :G_WIZARD_ID;
END IF;
END;
-- Branch: On Submit, go to Page 11 (Step 2)
-- Branch: On "Previous", go to Page 9 (previous step)
Progress Indicator
Add a progress bar or step indicator to the wizard header so users know where they are. APEX’s List region with the Wizard Progress template provides a clean, built-in progress indicator. Create a List with entries for each step and display it in a region on each wizard page. Highlight the current step using conditional CSS classes.
Validation Strategy
Validate each step before allowing navigation to the next. Use APEX validations on each page to check required fields and business rules for that step. For the final step, run comprehensive cross-step validation that checks the entire application before allowing final submission. Store data to the database at each step so users can resume an incomplete wizard later.
Cancel and Resume
Always provide a Cancel button that saves the current state and lets the user return later. Store incomplete submissions with a DRAFT status. On the wizard’s first page, check for existing drafts and offer to resume them rather than starting from scratch.