PHPackages                             anytech/silverstripe-secretfield - 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. anytech/silverstripe-secretfield

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

anytech/silverstripe-secretfield
================================

Masked secret form field with an admin-only reveal button for SilverStripe SiteConfig secrets (API keys, tokens).

0187PHP

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/anytech/silverstripe-secretfield)[ Packagist](https://packagist.org/packages/anytech/silverstripe-secretfield)[ RSS](/packages/anytech-silverstripe-secretfield/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

SilverStripe Secret Field
=========================

[](#silverstripe-secret-field)

A masked form field for SilverStripe SiteConfig secrets (API keys, tokens, service-account JSON). The stored value is never rendered into the page source; an admin-only reveal button fetches it on demand.

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

[](#requirements)

- SilverStripe `^6.1`
- PHP `^8.3`

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

[](#installation)

```
composer require anytech/silverstripe-secretfield
```

Usage
-----

[](#usage)

Use `SecretField` in place of `TextField` for any SiteConfig secret. That's all - no config to declare.

```
use Anytech\SecretField\SecretField;

SecretField::create('ApiKey', 'API key');
SecretField::create('ServiceAccountJSON', 'Service account JSON')->setMultiline(true);
```

- The field shows a masked hint when a value is saved; leaving it blank on save keeps the stored value.
- Reveal is restricted to `ADMIN` and CSRF-protected via the CMS security token.
- A field is revealable only if it is declared as a `SecretField` on SiteConfig.
- Works on disabled fields too (e.g. autofilled tokens) - reveal only reads.

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance60

Regular maintenance activity

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/6244070?v=4)[Kayne Middleton](/maintainers/Anytech)[@anytech](https://github.com/anytech)

---

Top Contributors

[![anytech](https://avatars.githubusercontent.com/u/6244070?v=4)](https://github.com/anytech "anytech (3 commits)")

### Embed Badge

![Health badge](/badges/anytech-silverstripe-secretfield/health.svg)

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

###  Alternatives

[mateffy/laravel-introspect

Analyze Laravel codebases and find structured information about models, routes and other Laravel-specific things.

17110.7k2](/packages/mateffy-laravel-introspect)

PHPackages © 2026

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