Multi-step form development for website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1215
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1043
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    823
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Multi-Step Form Development

Multi-step form breaks long process into sequential steps. Psychologically easier to fill 4 screens with 3 fields each than one screen with 12 fields. Applied in onboarding, checkout, service requests, surveys.

Component Architecture

import { useForm, FormProvider } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { useState } from 'react';

// Validation schemas for each step
const step1Schema = z.object({
  firstName: z.string().min(2, 'Minimum 2 characters'),
  lastName:  z.string().min(2),
  email:     z.string().email('Invalid email'),
});

const step2Schema = z.object({
  phone:   z.string().regex(/^\+\d{1,3}\d{6,14}$/, 'Format: +1234567890'),
  city:    z.string().min(2),
  address: z.string().optional(),
});

const step3Schema = z.object({
  serviceId:    z.number().positive(),
  preferredDate: z.string(),
  comment:       z.string().max(500).optional(),
});

const STEPS = [step1Schema, step2Schema, step3Schema];

export function MultiStepForm({ onSubmit }: { onSubmit: (data: FormData) => Promise<void> }) {
  const [currentStep, setCurrentStep] = useState(0);
  const [formData, setFormData]       = useState<Partial<FormData>>({});

  const form = useForm({
    resolver: zodResolver(STEPS[currentStep]),
    defaultValues: formData,
  });

  async function handleNext(stepData: Partial<FormData>) {
    const merged = { ...formData, ...stepData };
    setFormData(merged);

    if (currentStep < STEPS.length - 1) {
      setCurrentStep(s => s + 1);
      form.reset(merged);
    } else {
      await onSubmit(merged as FormData);
    }
  }

  const progress = ((currentStep + 1) / STEPS.length) * 100;

  return (
    <FormProvider {...form}>
      {/* Progress bar */}
      <div className="mb-8">
        <div className="flex justify-between text-sm text-gray-500 mb-2">
          <span>Step {currentStep + 1} of {STEPS.length}</span>
          <span>{Math.round(progress)}%</span>
        </div>
        <div className="h-2 bg-gray-100 rounded-full">
          <div
            className="h-2 bg-blue-500 rounded-full transition-all duration-500"
            style={{ width: `${progress}%` }}
          />
        </div>
      </div>

      {/* Steps */}
      <form onSubmit={form.handleSubmit(handleNext)}>
        {currentStep === 0 && <Step1ContactInfo />}
        {currentStep === 1 && <Step2DeliveryInfo />}
        {currentStep === 2 && <Step3ServiceSelection />}

        <div className="flex gap-3 mt-6">
          {currentStep > 0 && (
            <button
              type="button"
              onClick={() => setCurrentStep(s => s - 1)}
              className="btn-secondary"
            >
              Back
            </button>
          )}
          <button type="submit" className="btn-primary flex-1">
            {currentStep < STEPS.length - 1 ? 'Next' : 'Submit'}
          </button>
        </div>
      </form>
    </FormProvider>
  );
}

Saving Progress

Each step data saved to localStorage — user can close tab and return:

// Auto-save to localStorage
useEffect(() => {
  const saved = localStorage.getItem('form_draft');
  if (saved) setFormData(JSON.parse(saved));
}, []);

function handleNext(stepData) {
  const merged = { ...formData, ...stepData };
  setFormData(merged);
  localStorage.setItem('form_draft', JSON.stringify(merged));
  // ...
}

// Cleanup after successful submission
function handleSuccess() {
  localStorage.removeItem('form_draft');
}

Transition Animation

import { AnimatePresence, motion } from 'framer-motion';

<AnimatePresence mode="wait">
  <motion.div
    key={currentStep}
    initial={{ opacity: 0, x: 50 }}
    animate={{ opacity: 1, x: 0 }}
    exit={{ opacity: 0, x: -50 }}
    transition={{ duration: 0.2 }}
  >
    {/* Current step content */}
  </motion.div>
</AnimatePresence>

Timeframe

Multi-step form with 3–5 steps, validation, and progress saving: 3–5 working days.