PHPackages                             plugin/prefill-gravity-forms - 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. plugin/prefill-gravity-forms

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

plugin/prefill-gravity-forms
============================

Prefill GravityForms Plugin

v2.0.0(1mo ago)1609↓79.2%2[3 issues](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/issues)[4 PRs](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/pulls)PHPPHP ^8.1CI passing

Since Oct 21Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms)[ Packagist](https://packagist.org/packages/plugin/prefill-gravity-forms)[ RSS](/packages/plugin-prefill-gravity-forms/feed)WikiDiscussions main Synced yesterday

READMEChangelog (7)Dependencies (24)Versions (67)Used By (0)

Yard | BRP Prefill GravityForms
===============================

[](#yard--brp-prefill-gravityforms)

Description
-----------

[](#description)

Prefill GravityForms fields, based on the Dutch BSN number. Retrieve personal information and place these values in the corrensponding fields.

Dependencies
------------

[](#dependencies)

To use this plug-in, the following dependencies are required:

- GravityForms (premium)

In addition, at least one of the following plug-ins must be installed to enable authentication by BSN:

- Yard | GravityForms DigiD ()
- OWC Signicat OpenID ()

Features
--------

[](#features)

- Map GravityForms fields to attributes retrieved from the configured supplier.
- Mapped fields will be prefilled while rendering a form.
- Gutenberg block for displaying personal data of the current logged in user.

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

[](#installation)

### Manual installation

[](#manual-installation)

1. Upload the 'prefill-gravity-forms' folder in to the `/wp-content/plugins/` directory.
2. `cd /wp-content/plugins/prefill-gravity-forms`
3. Run `composer install, NPM asset build is in version control already.
4. Activate the plugin in via the WordPress admin.

### Composer installation

[](#composer-installation)

1. `composer source git@github.com:OpenWebconcept/plugin-prefill-gravity-forms.git`
2. `composer require plugin/prefill-gravity-forms`
3. `cd /wp-content/plugins/prefill-gravity-forms`
4. Run `composer install`, NPM asset build is in version control already.

### Setup

[](#setup)

1. Go to '/wp-admin/admin.php?page=gf\_settings&amp;subview=owc-gravityforms-iconnect' and configure all the required settings.

- 1. Suppliers will provide the needed certificates which need to be selected in order to make prefilling form fields work.
- 2. Suppliers will also provide an API-key, certificates password (if needed) and a base URL.
- 3. [OIN](https://logius.nl/domeinen/toegang/organisatie-identificatienummer/wat-is-het) is a unique number for organizations provided by Logius.

2. Go to the form settings of the form you want to configure.
3. Scroll down and look for the 'OWC Prefill' panel and configure the settings.

### Cache Encryption

[](#cache-encryption)

To enable secure caching of sensitive data, you **must define an encryption key** in your `wp-config.php` file. This key is used to encrypt and decrypt the cached data and should be kept secret at all times.

Add the following line to your `wp-config.php`:

```
// Prefill Gravity Forms – Cache Encryption Key
define('PG_CACHE_ENCRYPTION_KEY', 'your-unique-32-character-key');
```

Important:

- Use a randomly generated, 32-character key for strong AES-256 encryption.
- Never store this key in the database.
- Keep it secret and secure — anyone with access to this key can decrypt cached data.

License
-------

[](#license)

The source code is made available under the [EUPL 1.2 license](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/blob/main/LICENSE.md). Some of the dependencies are licensed differently, with the BSD or MIT license, for example.

User model
----------

[](#user-model)

The `UserModel` provides a simple way to access BRP (Basisregistratie Personen) data that has been retrieved after a valid DigiD login. It automatically detects which data supplier is configured (in the add-on settings), loads the correct controller, and exposes a small set of helper methods for use in templates or form-prefill logic.

Before accessing any user attributes, always check whether the user is authenticated using DigiD.

### Usage

[](#usage)

```
$user = new \OWC\PrefillGravityForms\Models\UserModel();

if ( $user->isLoggedIn() ) {
    $bsn  = $user->bsn();
    $age  = $user->age();
}
```

This model does not handle authentication itself, it only exposes data retrieved by the underlying BRP supplier controller. If a controller fails to load (e.g., misconfiguration or missing supplier), the model gracefully returns default values.

To use this model, make sure it is enabled in the settings available at '/wp-admin/admin.php?page=gf\_settings&amp;subview=owc-gravityforms-iconnect'. Otherwise, the object will be instantiated but will not contain any data.

Gutenberg blocks
----------------

[](#gutenberg-blocks)

This plugin ships with two Gutenberg blocks for displaying personal data of the logged-in user on any page.

- **Personal Data Table** (`owc-prefill-gravity-forms/personal-data-table`) — a container block that wraps rows in an HTML table (``).
- **Personal Data Row** (`owc-prefill-gravity-forms/personal-data-row`) — displays a single personal data field. When placed inside the table block it renders as a ``, otherwise as a configurable HTML element (``, ``, or ``).

Each Personal Data Row block must be configured in the block sidebar:

SettingDescriptionSupplierMust match the supplier configured in the plugin settings.Goal bindingRequired for HaalCentraal API v2 — determines which fields are returned.ProcessingOptional processing context for HaalCentraal API v2.Personal data fieldThe specific BRP attribute to display (e.g. name, date of birth).Logging
-------

[](#logging)

Enable logging to monitor errors during communication with the BRP suppliers.

- Logs are written daily to `pg-log{-date}.json` in the WordPress webroot directory.
- A rotating file handler keeps up to 7 log files by default, deleting the oldest as needed.
- You can change the maximum number of log files using the filter described below.

Hooks
-----

[](#hooks)

### Change the maximum number of log files

[](#change-the-maximum-number-of-log-files)

Use the following filter to alter the rotating file handler's max files setting:

```
apply_filters('pg::logger/rotating_filer_handler_max_files', PG_LOGGER_DEFAULT_MAX_FILES)
```

### Intercept exceptions for custom handling

[](#intercept-exceptions-for-custom-handling)

You can intercept exceptions caught by the plugin for additional processing or custom logging using this filter:

```
do_action('pg::exception/intercept', $exception, $method)
```

The `$exception` parameter contains the caught exception object.

### Provide Custom Mapping Options from a Theme Directory

[](#provide-custom-mapping-options-from-a-theme-directory)

This plugin includes supplier-specific mapping option files. In version 1 of the "HaalCentraal API", all available fields were returned, even when only a subset was needed.

Since version 2 of HaalCentraal, this has changed: the goal binding (doelbinding) now determines which fields are returned. This results in a more concise dataset that contains only the necessary fields. Because each municipality (gemeente) can define its own unique goal bindings and corresponding fields, this plugin cannot include all possible mapping configurations by default.

```
add_filter('pg::theme/dir_mapping_options', function ($value) {
    return __DIR__ . '/templates/owc-prefill/';
}, 10, 1);
```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance74

Regular maintenance activity

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 74% 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 ~32 days

Total

53

Last Release

30d ago

Major Versions

v1.9.1 → v2.0.02026-06-03

PHP version history (2 changes)v1.0.1PHP &gt;=7.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62775?v=4)[Anton Zhuravsky](/maintainers/Yard)[@yard](https://github.com/yard)

---

Top Contributors

[![mvdhoek1](https://avatars.githubusercontent.com/u/11852816?v=4)](https://github.com/mvdhoek1 "mvdhoek1 (57 commits)")[![Rovasch](https://avatars.githubusercontent.com/u/166744617?v=4)](https://github.com/Rovasch "Rovasch (8 commits)")[![robertbossaert](https://avatars.githubusercontent.com/u/4972135?v=4)](https://github.com/robertbossaert "robertbossaert (4 commits)")[![ictbeheer](https://avatars.githubusercontent.com/u/14947039?v=4)](https://github.com/ictbeheer "ictbeheer (3 commits)")[![rmpel](https://avatars.githubusercontent.com/u/1086776?v=4)](https://github.com/rmpel "rmpel (2 commits)")[![SimonvanWijhe](https://avatars.githubusercontent.com/u/41121933?v=4)](https://github.com/SimonvanWijhe "SimonvanWijhe (1 commits)")[![hnccox](https://avatars.githubusercontent.com/u/89316701?v=4)](https://github.com/hnccox "hnccox (1 commits)")[![dtakken](https://avatars.githubusercontent.com/u/2066447?v=4)](https://github.com/dtakken "dtakken (1 commits)")

---

Tags

php7wordpress-plugin

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/plugin-prefill-gravity-forms/health.svg)

```
[![Health](https://phpackages.com/badges/plugin-prefill-gravity-forms/health.svg)](https://phpackages.com/packages/plugin-prefill-gravity-forms)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[azuracast/azuracast

The AzuraCast self-hosted web radio station management suite.

3.9k27.8k](/packages/azuracast-azuracast)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k16.4k79](/packages/elgg-elgg)[infinum/eightshift-libs

WordPress libs developed by Eightshift team to use in modern WordPress.

63125.5k3](/packages/infinum-eightshift-libs)[drupal-code-builder/drupal-code-builder

Code generator for Drupal

27253.3k1](/packages/drupal-code-builder-drupal-code-builder)

PHPackages © 2026

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