PHPackages                             locomotivemtl/charcoal-contrib-formio - 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. locomotivemtl/charcoal-contrib-formio

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

locomotivemtl/charcoal-contrib-formio
=====================================

Charcoal service provider to add a form builder property input using form.io.

0.1.2.2(4y ago)0295MITPHPPHP &gt;=5.6.0 || &gt;=7.0CI failing

Since Mar 4Pushed 4y ago13 watchersCompare

[ Source](https://github.com/locomotivemtl/charcoal-contrib-formio)[ Packagist](https://packagist.org/packages/locomotivemtl/charcoal-contrib-formio)[ Docs](https://locomotivemtl.github.io/charcoal-contrib-formio/)[ RSS](/packages/locomotivemtl-charcoal-contrib-formio/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (8)Used By (0)

Charcoal Contrib Formio
=======================

[](#charcoal-contrib-formio)

[![License](https://camo.githubusercontent.com/937a094c956508d555e53c4bf0e15cf15477825e388ebf9d10c26e652374c351/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d666f726d696f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-formio)[![Latest Stable Version](https://camo.githubusercontent.com/f96b4457b5153bb590158c61b81319ce29660239c2f2b2a116e85addfb2e5061/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d666f726d696f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-formio)[![Code Quality](https://camo.githubusercontent.com/c6ba801e5f47a44332216135a4d13c8631b144509aeb5336b2ccbf4bedf31ef8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d666f726d696f2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/locomotivemtl/charcoal-contrib-formio/)[![Coverage Status](https://camo.githubusercontent.com/7887505c6c638f44b9f48db946be3ef4160606ed45c2102a9e0145c2c526c150/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d666f726d696f2e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/locomotivemtl/charcoal-contrib-formio)[![Build Status](https://camo.githubusercontent.com/34c9dd2be9c2b01a3e828f1b2ff38bcf16ccfff879187971e783a9d937280ccc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d666f726d696f2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/locomotivemtl/charcoal-contrib-formio)

A [Charcoal](https://packagist.org/packages/locomotivemtl/charcoal-app) Charcoal service provider to add a form builder property input using form.io.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
    - [Dependencies](#dependencies)
- [Service Provider](#service-provider)
    - [Parameters](#parameters)
    - [Services](#services)
- [Configuration](#configuration)
- [Usage](#usage)
- [Development](#development)
    - [API Documentation](#api-documentation)
    - [Development Dependencies](#development-dependencies)
    - [Coding Style](#coding-style)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

The preferred (and only supported) method is with Composer:

```
$ composer require locomotivemtl/charcoal-contrib-formio
```

### Dependencies

[](#dependencies)

#### Required

[](#required)

- [**PHP 5.6+**](https://php.net): *PHP 7* is recommended.

Configuration
-------------

[](#configuration)

Add the formio module to the modules list in the site's config file.

```
"modules": {
    "charcoal/formio/formio": {}
}
```

Usage
-----

[](#usage)

Three property type are provided by this package :

- `formio/form` (Form builder input)
- `formio/schema` (Form schema)
- `formio/submission` (To save a form submission)

```
"my_property": {
    "type": "formio/form",
    "l10n": false,
    "label": "My form property"
},
```

```
"my_property": {
    "type": "formio/schema",
    "l10n": false,
    "label": "My schema property"
},
```

```
"my_property_submission": {
      "type": "formio/submission",
      "l10n": false,
      "label": "My submission property"
}
```

Note that formio properties do not support `l10n` for now.

To update a form when saving the object you must call the method `createOrUpdateRelation()` on the property. This example saves or updates the form builder schema for a property called `test`. This code should be found in the object's controller.

```
/**
 * {@inheritdoc}
 *
 * @see StorableTrait::preSave()
 * @return boolean
 */
protected function preSave()
{
    $this->test = $this->p('test')->createOrUpdateRelation($this->test, null);

    return parent::preSave();
}

/**
 * {@inheritdoc}
 *
 * @see StorableTrait::preUpdate
 * @param array $properties Optional properties to update.
 * @return boolean
 */
protected function preUpdate(array $properties = null)
{
    $clone = clone $this; // Avoid calling `load()` on current object.
    $this->test = $this->p('test')->createOrUpdateRelation($this->test, $clone->load()->test);

    return parent::preUpdate($properties);
}
```

Development
-----------

[](#development)

To install the development environment:

```
$ composer install
```

To run the scripts (phplint, phpcs, and phpunit):

```
$ composer test
```

Resources
---------

[](#resources)

- The Form rendering documentation. Useful for front-end rendering of stored form.io structures.
- The Form.io sdk documentation.
- Front-end frameworks.

### API Documentation

[](#api-documentation)

- The auto-generated `phpDocumentor` API documentation is available at:

- The auto-generated `apigen` API documentation is available at:
    [https://codedoc.pub/locomotivemtl/charcoal-contrib-formio/master/](https://codedoc.pub/locomotivemtl/charcoal-contrib-formio/master/index.html)

### Development Dependencies

[](#development-dependencies)

- \[php-coveralls/php-coveralls\]\[phpcov\]
- \[phpunit/phpunit\]\[phpunit\]
- \[squizlabs/php\_codesniffer\]\[phpcs\]

### Coding Style

[](#coding-style)

The charcoal-contrib-formio module follows the Charcoal coding-style:

- [*PSR-1*](https://www.php-fig.org/psr/psr-1/)
- [*PSR-2*](https://www.php-fig.org/psr/psr-2/)
- [*PSR-4*](https://www.php-fig.org/psr/psr-4/), autoloading is therefore provided by *Composer*.
- [*phpDocumentor*](http://phpdoc.org/) comments.
- [phpcs.xml.dist](phpcs.xml.dist) and [.editorconfig](.editorconfig) for coding standards.

> Coding style validation / enforcement can be performed with `composer phpcs`. An auto-fixer is also available with `composer phpcbf`.

Credits
-------

[](#credits)

- [Locomotive](https://locomotive.ca/)

License
-------

[](#license)

Charcoal is licensed under the MIT license. See [LICENSE](LICENSE) for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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 ~259 days

Total

5

Last Release

1462d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3f29e38395113e2400bdd7e51bea982b17f120d4d5a53d4473b53118ee46f8d?d=identicon)[JoelAlphonso](/maintainers/JoelAlphonso)

---

Top Contributors

[![JoelAlphonso](https://avatars.githubusercontent.com/u/10762266?v=4)](https://github.com/JoelAlphonso "JoelAlphonso (44 commits)")[![mducharme](https://avatars.githubusercontent.com/u/12157?v=4)](https://github.com/mducharme "mducharme (8 commits)")[![hugomutation](https://avatars.githubusercontent.com/u/46725070?v=4)](https://github.com/hugomutation "hugomutation (2 commits)")[![veve40](https://avatars.githubusercontent.com/u/7537381?v=4)](https://github.com/veve40 "veve40 (2 commits)")

---

Tags

charcoal

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/locomotivemtl-charcoal-contrib-formio/health.svg)

```
[![Health](https://phpackages.com/badges/locomotivemtl-charcoal-contrib-formio/health.svg)](https://phpackages.com/packages/locomotivemtl-charcoal-contrib-formio)
```

###  Alternatives

[locomotivemtl/charcoal-cms

Charcoal CMS (Content Management System) Module

529.0k3](/packages/locomotivemtl-charcoal-cms)[devtical/nova-qrcode-field

Nova QR code field

4560.6k2](/packages/devtical-nova-qrcode-field)[opendialogai/core

The OpenDialog Core package

3215.9k1](/packages/opendialogai-core)[locomotivemtl/charcoal-app

Charcoal application, based on Slim 3

1320.3k12](/packages/locomotivemtl-charcoal-app)[locomotivemtl/charcoal-admin

The Charcoal Administration Dashboard

1110.8k8](/packages/locomotivemtl-charcoal-admin)

PHPackages © 2026

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