PHPackages                             mmirus/gravity-forms-data-attributes - 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. mmirus/gravity-forms-data-attributes

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

mmirus/gravity-forms-data-attributes
====================================

Add custom data attributes to Gravity Forms fields.

1.1.1(6y ago)161.5k2[2 issues](https://github.com/mmirus/gravity-forms-data-attributes/issues)[10 PRs](https://github.com/mmirus/gravity-forms-data-attributes/pulls)MITPHPPHP &gt;=7.1.0

Since Dec 1Pushed 3y ago3 watchersCompare

[ Source](https://github.com/mmirus/gravity-forms-data-attributes)[ Packagist](https://packagist.org/packages/mmirus/gravity-forms-data-attributes)[ Docs](https://github.com/mmirus/gravity-forms-data-attributes)[ RSS](/packages/mmirus-gravity-forms-data-attributes/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (4)Versions (18)Used By (0)

Gravity Forms Data Attributes
=============================

[](#gravity-forms-data-attributes)

- [Usage](#usage)
- [Installation](#installation)
- [Contributing](#contributing)
- [Screenshots](#screenshots)

This plugin allows you to add custom data attributes to Gravity Forms fields.

It should work with:

- all of the Standard field types
- any of the Advanced field types that only have one input field (e.g., Email but not Address)
- the List advanced field type, including with multiple columns (thanks @reddo!).

For fields with choices, such as checkboxes, you can assign separate values for each data attribute for each choice (the UI for this is ugly right now 🤷‍).

Usage
-----

[](#usage)

For each field you want to enable data attributes for:

1. On the field's General settings tab, check the **Enable Data Attributes** box.
2. In the **Data Attribute Names** field that appears, enter one data attribute name (e.g., `my-attribute`) per line.
    - *Do not* prefix your attribute name with `data-`. The plugin will do that for you,
3. Save your form.
4. Reopen the field settings. You will now see additional setting fields where you can enter the value of each data attribute you added.
    - For fields with choices, such as checkboxes, the data attribute value settings appear next to each choice's name and value fields.
    - For other fields, the data attribute value settings will appear underneath the Data Attribute Names field.

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

[](#installation)

There are three options for installing this plugin:

1. With composer from [Packagist](https://packagist.org/packages/mmirus/gravity-forms-data-attributes): `composer require mmirus/gravity-forms-data-attributes`
2. With [GitHub Updater](https://github.com/afragen/github-updater)
3. By downloading the latest release ZIP from this repository and installing it like any normal WordPress plugin

Contributing
------------

[](#contributing)

To work on this project (for yourself or to contribute a PR):

1. Clone this repo
2. Run `composer install`
3. Run `yarn` or `npm install`

And you should be good to go.

Pre-commit linting is enforced (see `.eslintrc.js` and `.stylelintrc.js` for scripts and styles; PHP uses PSR-2).

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

[](#screenshots)

*Settings for a field without choices*

[![Alt Text](/screenshots/single-line-text.png)](/screenshots/single-line-text.png)

*Settings for a field with choices (checkboxes)*

[![Alt Text](/screenshots/checkboxes.png)](/screenshots/checkboxes.png)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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 ~78 days

Recently: every ~117 days

Total

7

Last Release

2289d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/524994?v=4)[Matt Mirus](/maintainers/mmirus)[@mmirus](https://github.com/mmirus)

---

Top Contributors

[![mmirus](https://avatars.githubusercontent.com/u/524994?v=4)](https://github.com/mmirus "mmirus (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![reddo](https://avatars.githubusercontent.com/u/1180060?v=4)](https://github.com/reddo "reddo (1 commits)")

---

Tags

data-attributesgravity-formsgravityformswordpresswordpress-pluginwordpressgravity-forms

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mmirus-gravity-forms-data-attributes/health.svg)

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

###  Alternatives

[roots/bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure

6.5k456.5k2](/packages/roots-bedrock)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[roots/wp-stage-switcher

WordPress plugin that allows you to switch between different environments from the admin bar

374458.3k3](/packages/roots-wp-stage-switcher)[vinkla/wordplate

The WordPlate boilerplate

2.2k5.3k](/packages/vinkla-wordplate)[cedaro/gravity-forms-iframe

Embed a Gravity Form on any site using an iframe.

1543.0k](/packages/cedaro-gravity-forms-iframe)

PHPackages © 2026

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