PHPackages                             lekoala/silverstripe-pure-modal - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. lekoala/silverstripe-pure-modal

ActiveSilverstripe-vendormodule[Localization &amp; i18n](/categories/localization)

lekoala/silverstripe-pure-modal
===============================

Dead simple modals for SilverStripe (works in the admin too!)

2.0.1(1mo ago)914.9k↓58.9%41MITPHPPHP ^8.3CI passing

Since Aug 26Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/lekoala/silverstripe-pure-modal)[ Packagist](https://packagist.org/packages/lekoala/silverstripe-pure-modal)[ GitHub Sponsors](https://github.com/lekoala)[ RSS](/packages/lekoala-silverstripe-pure-modal/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (10)Versions (19)Used By (1)

SilverStripe Pure Modal module
==============================

[](#silverstripe-pure-modal-module)

[![Build Status](https://github.com/lekoala/silverstripe-pure-modal/actions/workflows/ci.yml/badge.svg)](https://github.com/lekoala/silverstripe-pure-modal/actions/workflows/ci.yml/badge.svg)[![scrutinizer](https://camo.githubusercontent.com/7010da35b67ee783218340f99f982f0c8f5fd8ab9286fbeab0b2ff1a1f46deec/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c656b6f616c612f73696c7665727374726970652d707572652d6d6f64616c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lekoala/silverstripe-pure-modal/)[![Code coverage](https://camo.githubusercontent.com/b7b491d67ae73e373b0461ae6ae057a6a09c40784f86894717dfc1b9e4546d58/68747470733a2f2f636f6465636f762e696f2f67682f6c656b6f616c612f73696c7665727374726970652d707572652d6d6f64616c2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lekoala/silverstripe-pure-modal)

Intro
-----

[](#intro)

Dead simple modals for SilverStripe (works in the admin too!)

Sample usage
------------

[](#sample-usage)

Simply pass the content to display in the modal. The modal will be accessible through a button in the fieldset

You can also set an iframe to be displayed within the modal in case you want to display a form for example.

```
$myHtmlContent = "Some content here";
$ImportStuff = new PureModal('ImportStuff', 'Import Stuff', $myHtmlContent);
$fields->addFieldToTab('Root.Stuff', $ImportStuff);
$ImportStuff->setIframeAction('import_stuff');
$ImportStuff->setIframeTop(true);
```

And here is a sample `import_stuff` method

```
public function import_stuff(HTTPRequest $req)
{
    $Stuff = $this->getRequestedRecord();
    $fields = new FieldList([
        new FileField('File'),
        new HiddenField('StuffID', null, $Stuff->ID),
    ]);
    $actions = new FieldList([
        new FormAction('doUpload', 'Upload')
    ]);
    $form = new Form(Controller::curr(), 'MyForm', $fields, $actions);

    return PureModal::renderDialog($this, ['Form' => $form]);
}
```

Modal action
------------

[](#modal-action)

This feature require my [cms-actions](https://github.com/lekoala/silverstripe-cms-actions) module.

```
    public function getCMSActions()
    {
        $actions = parent::getCMSActions();
        $doDeny = new PureModalAction("doDeny", "Deny");
        $predefinedText = setFieldList($iframeFields);
        $doDeny->setShouldRefresh(true);
        $doDeny->setDialogButtonTitle('Deny the request'); // customised modal submit button
        $actions->push($doDeny);
    }
```

It creates a button that opens a modal with a set of fields. These fields are submitted alongside the form.

```
    public function doDeny($data)
    {
        $this->DeniedReason = $data['EnterText'];
        $this->Status = "denied";
        $this->write();
        return 'Denied';
    }
```

You can remove the submit button from the modal itself, for example to make it an information window only. By doing like this:

```
    public function getCMSActions()
    {
        $actions = parent::getCMSActions();
        $doDeny = new PureModalAction("noopInfo", "Information");

        // .. add fields

        $doDeny->setShowDialogButton(false);
        $actions->push($doDeny);
    }
```

Compatibility
-------------

[](#compatibility)

Tested with ^5

Maintainer
----------

[](#maintainer)

LeKoala -

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance94

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 82.2% 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 ~102 days

Recently: every ~141 days

Total

18

Last Release

33d ago

Major Versions

1.x-dev → 2.0.02025-07-10

PHP version history (4 changes)1.0.0PHP &gt;=7.2

1.2.0PHP ^7.4 || ^8

1.2.1PHP ^8.1

2.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/250762?v=4)[Thomas Portelange](/maintainers/lekoala)[@lekoala](https://github.com/lekoala)

---

Top Contributors

[![lekoala](https://avatars.githubusercontent.com/u/250762?v=4)](https://github.com/lekoala "lekoala (60 commits)")[![gurucomkz](https://avatars.githubusercontent.com/u/12028675?v=4)](https://github.com/gurucomkz "gurucomkz (7 commits)")[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (3 commits)")[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (2 commits)")[![beerbohmdo](https://avatars.githubusercontent.com/u/905241?v=4)](https://github.com/beerbohmdo "beerbohmdo (1 commits)")

---

Tags

modalphpsilverstripesilverstripe-modulei18ncsssilverstripecmsmodulemodal

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lekoala-silverstripe-pure-modal/health.svg)

```
[![Health](https://phpackages.com/badges/lekoala-silverstripe-pure-modal/health.svg)](https://phpackages.com/packages/lekoala-silverstripe-pure-modal)
```

###  Alternatives

[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39344.8k31](/packages/lekoala-silverstripe-cms-actions)[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[silverstripe/translatable

Allows translation of DataObject and SiteTree records into multiple languages

52199.3k8](/packages/silverstripe-translatable)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

91437.9k29](/packages/tractorcow-silverstripe-fluent)[lekoala/silverstripe-softdelete

Soft delete extension for SilverStripe

11236.3k](/packages/lekoala-silverstripe-softdelete)[lekoala/silverstripe-mandrill

Adds mandrill in the SilverStripe CMS

1927.4k](/packages/lekoala-silverstripe-mandrill)

PHPackages © 2026

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