WP Manifestindependent plugin directory
manifest / forms / gravity-forms-data-attributes

Gravity Forms Data Attributes WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Add custom data attributes to your Gravity Forms field markup

★ 16stars
1.7kcomposer installs
1.1.1latest · 6 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/mmirus/gravity-forms-data-attributes/archive/refs/heads/master.zip

On Packagist as mmirus/gravity-forms-data-attributes:

composer require mmirus/gravity-forms-data-attributes
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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

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

There are three options for installing this plugin:

  1. With composer from Packagist: composer require mmirus/gravity-forms-data-attributes
  2. With GitHub Updater
  3. By downloading the latest release ZIP from this repository and installing it like any normal WordPress plugin

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

Settings for a field without choices

Alt Text

Settings for a field with choices (checkboxes)

Alt Text

Releases

7 releases.

Tag
Published
1.1.1 latest
Mar 17, 2020 6 years ago
Sep 24, 2019 7 years ago
Aug 28, 2019 7 years ago
Dec 19, 2018 7 years ago
Dec 1, 2018 7 years ago
Dec 1, 2018 7 years ago
Dec 1, 2018 7 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Gravity Forms Data Attributes 1.1.0 · audited by WP Registry

No security issues found.

Audited release
1.1.0
Findings
none
Worst severity
—
Content hash
405920fb201fee8c33378adf…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.