PHPackages                             briceburg/silverstripe-flexiform - 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. briceburg/silverstripe-flexiform

ActiveSilverstripe-module[Templating &amp; Views](/categories/templating)

briceburg/silverstripe-flexiform
================================

Add CMS configurable forms to your SilverStripe objects.

0.5.0(11y ago)181242[4 PRs](https://github.com/briceburg/silverstripe-flexiform/pulls)1BSD-3-ClausePHP

Since Dec 2Pushed 10y ago4 watchersCompare

[ Source](https://github.com/briceburg/silverstripe-flexiform)[ Packagist](https://packagist.org/packages/briceburg/silverstripe-flexiform)[ Docs](https://github.com/briceburg/silverstripe-flexiform)[ RSS](/packages/briceburg-silverstripe-flexiform/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (1)

silverstripe-flexiforms
=======================

[](#silverstripe-flexiforms)

Add CMS configurable forms to your SilverStripe objects.

Features
--------

[](#features)

- Add forms to any DataObject or Page
- GridField based management of fields, options, submissions, actions, &amp;c.
    - 100% compatible with [holder pages](https://github.com/briceburg/silverstripe-pageholder) &amp; VersionedGridfield
- Programmatically define initial fields and handlers + build them from the Environment Builder
- **Many-many** between Form and `FlexiFormField`, **has\_many** between `FlexiFormHandler`
    - reduced repetitiveness and improved consistency
    - *extraFields* allows per-form customization without disturbing other forms using the same field
- Protection against form re-submissions
- Definable, friendly post URLs for logs and analytics
- Support for multiple forms per page

Requirements
------------

[](#requirements)

The venerable GridFieldExtensions

Tested in SilverStripe 3.1

Screenshots
-----------

[](#screenshots)

[![flexiform fields](https://github.com/briceburg/silverstripe-flexiform/raw/master/docs/screenshots/flexiform_1.png?raw=true)](https://github.com/briceburg/silverstripe-flexiform/blob/master/docs/screenshots/flexiform_1.png?raw=true)

[![field editing](https://github.com/briceburg/silverstripe-flexiform/raw/master/docs/screenshots/flexiform_2.png?raw=true)](https://github.com/briceburg/silverstripe-flexiform/blob/master/docs/screenshots/flexiform_2.png?raw=true)

Usage
=====

[](#usage)

- Add flexiforms to Pages and DataObjects by extending with `FlexiFormExtension`. E.g.

```
class Event extends DataObject
{

    private static $extensions = array(
        'FlexiFormExtension'
    );

}
```

Trigger the environment builder (/dev/build) after extending objects -- You will now see the Form tab when editing Event in the CMS.

- To display flexiforms, add **$FlexiForm** to your template. Here's a sample Event.ss;

```

    $Content

  $FlexiForm

```

Here we use **$FlexiFormPosted** to hide $Content if a form has been posted.

Flexiform also provides a convenience wrapper around the standard **$Form** method. Calling $Form from a Page extended by FlexiFormExtension will output the associated flexiform. E.g.

```

    $Content

  $Form

```

Works exactly the same as the first example.

### Form Identifiers

[](#form-identifiers)

Use Form Identifiers when you have **multiple forms on a page**, need to **reference a form** (e.g from another page), or want to **control the post URL**.

FlexiForm extends `ContentController` to provide the **$FlexiForm** method to all pages. By default it expects the controller's *dataRecord* to be an object extended by `FlexiFormExtension`. You can explicitly set the flexiform object by calling the **setFlexiFormObject** method on your controller, or by passing an *Identifer* to **$FlexiForm**.

Form Identifiers are defined in the *Settings* tab on flexiforms. The identifier is also used in post URLs for easy tacking of form submissions in *server logs* and *analytics*.

```

  $FlexiForm('newsletter_form')

```

### Shortcodes

[](#shortcodes)

Alternately, you can use the **\[flexiform\]** [shortcode](http://doc.silverstripe.org/framework/en/reference/shortcodes)in content areas. This is especially useful for controlling placement of a form inside existing content.

Optionally pass a *Form Identifier* through the ID paramater.

```
Some WYSIWYG Content

Default Form:  [FlexiForm]

Explicit Form:  [flexiform id=registration_form]

```

### Templates, Custom Form Classes

[](#templates-custom-form-classes)

By default, flexiform uses *Form.ss* to render the form. You can change the template by

- Simple Means: Adding a **FlexiForm.ss** to your theme
- Powerful Means: Provide an alternate form class via **$flexiform\_form\_class**

```
class Event extends DataObject
{
    private static $extensions = array(
        'FlexiFormExtension'
    );

    private static $flexi_form_class = 'EventForm';

}

// attempts to use EventForm.ss by default, falling back to Form.ss
class EventForm extends FlexiForm {

    // optional: provide a specific template
    // public function getTemplate() { return 'EventSpecificTemplate'; }
}
```

Configuration
=============

[](#configuration)

Most configuration is accomplished through the CMS -- however you can further tailor behavior through subclassing (protected properties, getters, and setters) and [YAML Configuration](http://doc.silverstripe.org/framework/en/topics/configuration).

See [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for documentation and examples.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

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 ~4 days

Total

6

Last Release

4155d ago

### Community

Maintainers

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

---

Top Contributors

[![briceburg](https://avatars.githubusercontent.com/u/490144?v=4)](https://github.com/briceburg "briceburg (120 commits)")

---

Tags

silverstripesortablecmsformuserformsmanagegridfieldflexiform-fields

### Embed Badge

![Health badge](/badges/briceburg-silverstripe-flexiform/health.svg)

```
[![Health](https://phpackages.com/badges/briceburg-silverstripe-flexiform/health.svg)](https://phpackages.com/packages/briceburg-silverstripe-flexiform)
```

###  Alternatives

[undefinedoffset/sortablegridfield

Adds drag and drop functionality to Silverstripe's GridField

941.2M50](/packages/undefinedoffset-sortablegridfield)[axllent/silverstripe-tiled-gridfield

Inline/tiled images in a Silverstripe GridField table

163.2k](/packages/axllent-silverstripe-tiled-gridfield)

PHPackages © 2026

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