PHPackages                             svandragt/silverstripe-hiddenfields - 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. svandragt/silverstripe-hiddenfields

AbandonedArchivedSilverstripe-module[Utility &amp; Helpers](/categories/utility)

svandragt/silverstripe-hiddenfields
===================================

Takes form fields specified through $hidden\_fields and hides them from edit form.

0191PHP

Since Apr 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/svandragt/silverstripe-hiddenfields)[ Packagist](https://packagist.org/packages/svandragt/silverstripe-hiddenfields)[ RSS](/packages/svandragt-silverstripe-hiddenfields/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

silverstripe-hiddenfields
=========================

[](#silverstripe-hiddenfields)

Takes form fields you specified through $hidden\_fields and hides them from the edit form. I found if you completely remove the field then the value doesn't get saved to the database and you end up with child without a parent relationship.

Instead this extension replaces the field with a hiddenfield.

Usage
-----

[](#usage)

1. Install using composer `composer require "svandragt/silverstripe-hiddenfields:*"`
2. Attach the DataExtension to your DataObjects / Page types through the configuration system:

```
Object::add_extension("DataObject","HiddenFieldsDataExtension");

```

DIY Demo:
---------

[](#diy-demo)

Course.php:

```
