PHPackages                             infinityloop-dev/multistep-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. infinityloop-dev/multistep-form

ActiveLibrary[Templating &amp; Views](/categories/templating)

infinityloop-dev/multistep-form
===============================

Component for Nette framwork which helps with creation of multistep forms.

v1.0.1(6y ago)5568MITPHPPHP &gt;=7.4

Since Jan 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/infinityloop-dev/multistep-form)[ Packagist](https://packagist.org/packages/infinityloop-dev/multistep-form)[ Docs](https://www.infinityloop.dev/)[ RSS](/packages/infinityloop-dev-multistep-form/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Multistep form
==============

[](#multistep-form)

🔧 Component for Nette framwork which helps with creation of multistep forms.

Introduction
------------

[](#introduction)

This component provides a simple way to create a multistep form. Handles swapping between steps, passing values from previous steps to current one and passing all combined values to final success callback. Also handles common edge cases, such as distinction between multiple instances of one form accessed by one client.

Installation
------------

[](#installation)

Install package using composer

```
composer require infinityloop-dev/multistep-form

```

Dependencies
------------

[](#dependencies)

- PHP &gt;= 7.4
- [nette/application](https://github.com/nette/application)
- [nette/http](https://github.com/nette/http)
- [nette/forms](https://github.com/nette/forms)

How to use
----------

[](#how-to-use)

- Register `\Infinityloop\MultistepForm\IMultiStepFormFactory` as service in cofiguration file.
- Inject it into component/presenter where you wish to use multi step form,
    - write createComponent method and use macro {control} in template file
- Submit buttons for moving forward and backward are added automaticaly.

### Example createComponent method

[](#example-createcomponent-method)

```
protected function createComponentMultistepForm() : \Infinityloop\MultistepForm\MultistepForm
{
    $multistepForm = $this->multistepFormFactory->create()
        ->setDefaults(['action' => \App\Enum\EAction::ACTION2])
        ->setSuccessCallback(function(array $values) {
            $this->model->save($values);
        });

    // first step
    $multistepForm->addFactory(function() : \Nette\Forms\Form {
        $form = new \Nette\Application\UI\Form();
        $form->addProtection();
        $form->setTranslator($this->translator);

        $form->addSelect('action', 'Akce', \App\Enum\EAction::ENUM)
            ->setRequired();

        return $form;
    }, __DIR__ . '/step1.latte');

    // second step
    $multistepForm->addFactory(function(array $previousValues) : \Nette\Forms\Form {
        $form = new \Nette\Application\UI\Form();
        $form->addProtection();
        $form->setTranslator($this->translator);

        if (\in_array($previousValues['action'], [\App\Enum\EAction::ACTION1, \App\Enum\EAction::ACTION2], true)) {
            $form->addText('action_1or2', 'Action 1 or 2')
                ->setRequired();
        } else {
            $form->addText('action_xyz', 'Action Xyz')
                ->setRequired();
        }
    });

    return $multistepForm;
}

```

### Options

[](#options)

- setDefaults(array)
    - default values for your form, all steps at once
- addFactory(callable, ?string)
    - first argument is factory function from which the form is created
    - second argument is custom template path
        - the standard `{control form}` is used if no template is specified for current step
        - in custom template you can manualy render each step using `{form form} ... {/form}`
- setSuccessCallback(callable)
    - callback where values from all steps are sent after submitting last step

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

2

Last Release

2297d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00654c913028f8d25a226eb2ddf368e1b999bf72fa4f77dbd1449c1df218756c?d=identicon)[peldax](/maintainers/peldax)

---

Top Contributors

[![peldax](https://avatars.githubusercontent.com/u/10790033?v=4)](https://github.com/peldax "peldax (16 commits)")

---

Tags

componentmultistep-formsnettenette-componentphp

### Embed Badge

![Health badge](/badges/infinityloop-dev-multistep-form/health.svg)

```
[![Health](https://phpackages.com/badges/infinityloop-dev-multistep-form/health.svg)](https://phpackages.com/packages/infinityloop-dev-multistep-form)
```

###  Alternatives

[contributte/forms-bootstrap

Nette extension for Bootstrap forms

211.1M4](/packages/contributte-forms-bootstrap)[tomaj/nette-bootstrap-form

Nette bootstrap form renderer

28440.4k6](/packages/tomaj-nette-bootstrap-form)[tomaj/nette-api

Nette api

36261.8k4](/packages/tomaj-nette-api)[nepada/form-renderer

Latte template based form renderer for Nette forms with full support for Bootstrap 3, 4 &amp; 5.

11251.0k](/packages/nepada-form-renderer)[nasext/dependent-select-box

Dependent Select Box for Nette Framework.

21262.8k2](/packages/nasext-dependent-select-box)[nextras/forms-rendering

Rendering helpers for Nette Framework Forms.

1698.4k2](/packages/nextras-forms-rendering)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
