PHPackages                             scaleplan/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. scaleplan/form

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

scaleplan/form
==============

Yet another form builder

2101PHP

Since Nov 16Pushed 5y ago2 watchersCompare

[ Source](https://github.com/scaleplan/form)[ Packagist](https://packagist.org/packages/scaleplan/form)[ RSS](/packages/scaleplan-form/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SkaForm
=======

[](#skaform)

Form Builder for PHP.

#### Installation

[](#installation)

`composer reqire scaleplan/form`

#### Description

[](#description)

To generate a form, you need:

- form template
- shape configuration

A form template is an HTML file with a new form inserted into its body, and in the simplest case it can look like this:

```

  the
    example form template

  the

```

The size and complexity of the configuration depends on the complexity of the form. For example, privedem form redaktirovaniya user data:

```
labelAfter: 1
invisibleClass: no-display
currentClass: current
currentNumber: 0

templatePath:/views/private/forms/templates

title:
  text: Edit user profile

form:
  id: main
  action:/user/update
  novalidate: novalidate

menu:
  class: z-depth-3

sections:
  - title: Basic
    id: main_info
    fields:
      - fieldWrapper:
          class: input-field
        type: text
        name: login
        labelText: Login
        data-input: "'mask': 'x{3,}'"
        required: required

      - fieldWrapper:
          class: input-field
        type: email
        name: email
        labelText: E-mail
        data-input: "'alias': 'email'"
        required: required

      - fieldWrapper:
          class: input-field
        type: tel
        name: phone_number
        labelText: phone Number
        data-input: "'mask': '+7 (999) 999-99-99'"

    buttons:
      - text: Forward
        class: next

  - title: Career
    id: carrier
    fields:
      - fieldWrapper:
          class: input-field
        type: select
        name: education
        labelText: Education

      - fieldWrapper:
          class: input-field
        type: text
        name: job_place
        labelText: place of work

      - fieldWrapper:
          class: input-field
        type: text
        name: post
        labelText: Position

    buttons:
      - text: Back
        class: prev

      - text: Forward
        class: next

  - title: Avatar
    id: avatar
    fields:
      - type: file
        template: thumb_template.html
        name: image
        labelText: Upload your avatar
        class: 'image thumb'

    buttons:
      - text: Back
        class: prev

buttons:
  - class: reset
  - type: submit

```

Consider the configuration directives:

- **labelAfter**  - generate labels after fields;

**invisibleClass** - which class to use for element hiding;

- **currentClass** - class denoting the selected menu item (indicates the selected section of the form);
- **currentNumber** - which section of the form to choose by default;
- **templatePath** - absolute path to the form template;
- **title** - description of the form title,  *text* -title text, you can also add any HTML attributes such as id, class, and the like...
- **form** - attributes of the form itself (*&lt;form&gt;*tag);
- **menu**  - form menu attributes (*&lt;menu &gt;*  tag), makes sense if the form has sections (*sections*));
- **sections** - form sections with attributes. In addition, the menu is formed by sections: menu items (*&lt;a&gt;* tag) have the same anchor as the *title* attribute of the section and, if the section has *id*, for example, *main\_info*, the corresponding menu item will have *href="#main\_info"*. This part can be omitted if the form is not necessary to divide razdely, then the *fields* will be in the root config;
- **fields** - form fields, attributes, templates and their wrappers, if necessary:

    - templates are used when instead of a blank form field, for example, input, we want to use an HTML template and already template elements to set attributes;
    - wrapper is the element into which the form element is wrapped, by default it is *&lt;div&gt;*, i.e. from

    ```
    - fieldWrapper:
        class: input-field

    ```

    the generated wrapper will be

    ```

    ```
- **buttons** - in the section context, these are buttons of the section with attributes, in the form context - common for all sections of the button.

That's easy. Despite the possible volumetric configuration of the form, it is very easy to fall on the HTML-model

#### Now generation:

[](#now-generation)

```
$form = new Form(Yaml:: parse(file_get_contents('user.yml')));
echo $form->render();

```

That's all. The output will form.

[Class documentation](docs_en)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10077243?v=4)[Aleksandr Avtomonov](/maintainers/avtomon)[@avtomon](https://github.com/avtomon)

---

Top Contributors

[![avtomon](https://avatars.githubusercontent.com/u/10077243?v=4)](https://github.com/avtomon "avtomon (20 commits)")

### Embed Badge

![Health badge](/badges/scaleplan-form/health.svg)

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

###  Alternatives

[whichbrowser/parser

Useragent sniffing library for PHP

1.8k11.6M50](/packages/whichbrowser-parser)[tm/tooly-composer-script

Simple composer script to manage phar files.

103280.1k32](/packages/tm-tooly-composer-script)[joetannenbaum/mr-clean

23044.5k](/packages/joetannenbaum-mr-clean)[winter/wn-blog-plugin

Blog plugin for Winter CMS

2042.1k3](/packages/winter-wn-blog-plugin)

PHPackages © 2026

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