Codetive
Sign In
Coding challenges as of now are only available on desktop
On mobile you can try our quiz
Quiz
We are working hard to bring coding challenges with editor on mobile 💚

Multistep Form

Note: This challenge focuses more on logic than UI. If you want to also focus on and practice UI, visit our UI Components challenges.

Objective: Implement a multistep form with 3 steps, where users can input data and navigate back and forth between steps.

Instructions:

  1. Create a form with at least 3 steps. Each step should contain a set of input fields.

    • Step 1: Personal Information (e.g., Name, Email).
    • Step 2: Contact Details (e.g., Phone Number, Address).
    • Step 3: Review (Display entered information for review before submission).
  2. Include "Next" and "Back" buttons to allow users to navigate between the steps.

  3. On the final step, provide a "Submit" button that console.logs or processes the form data.

Requirements:

  • Users should be able to move between steps using the "Next" and "Back" buttons.
  • The form data should persist as users navigate between steps.

Hints:

  1. Use an array or object to store the form data and update it as the user progresses through the steps.

Bonus:

  1. Implement validation for the form fields (e.g., email format, required fields).
  2. Allow users to directly jump to a specific step if they’ve already visited it.
  3. Show a summary of all entered information on the final review step before submission.
Browser
Console
Tests
Soon