amici/craft-super-dynamic-fields

Use JSON templates as field options for dropdown, radio or checkboxes.

Maintainers

Package info

github.com/amici-infotech/craft-super-dynamic-fields

Documentation

Type:craft-plugin

pkg:composer/amici/craft-super-dynamic-fields

Transparency log

Statistics

Installs: 11 644

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

5.1.0 2026-08-07 10:39 UTC

README

Use a site Twig template that outputs JSON as the option source for Dropdown, Radio, Checkboxes, and Multi-select fields. Reuse one option list across many fields, generate options from Craft queries, and attach arbitrary per-option extras for Twig and GraphQL.

Requirements

  • Craft CMS ^5.0
  • PHP ^8.2

Installation

composer require amici/craft-super-dynamic-fields

In the Control Panel: Settings → Plugins → Super Dynamic Fields → Install.

Quick start

  1. Create a site template that outputs a JSON array (see JSON format).
  2. Create a field and choose one of:
    • Dropdown [Super Dynamic Fields]
    • Radio Buttons [Super Dynamic Fields]
    • Checkboxes [Super Dynamic Fields]
    • Multi-select [Super Dynamic Fields]
  3. Set JSON Template to your template path.
  4. Turn Cache options off if options depend on the current element.
[
  {"value": "", "label": "--"},
  {"value": "option1", "label": "Option 1", "icon": "circle-check", "color": "#780d0d"},
  {"value": "option2", "label": "Option 2", "icon": "@webroot/icons/abc.svg", "color": "red"}
]
{{ entry.myField.value }}
{{ entry.myField.label }}
{{ entry.myField.getIconHtml()|raw }}
{% set extras = entry.myField.getExtras() %}
{{ extras.class ?? '' }}

Documentation

  1. Installation
  2. Concepts
  3. JSON format (icons, optgroups, extras)
  4. Twig API
  5. GraphQL
  6. Events / PHP
  7. Native fields comparison

Upgrade notes

After updating to 5.1.0+, run migrations so stored field type class names are rewritten from the legacy SueprDynamic* spelling:

php craft migrate/all

Legacy class aliases remain so existing fields keep working until the migration runs.

Support