
Hold a modifier key and click any Inputfield header to copy the field’s machine name to the clipboard — without collapsing the field.
Useful when building templates, writing selectors, or debugging.
Features
- Copies the field machine name on modifier + click
- Field stays open (no collapse)
- Resolves clean field names inside Repeaters and context-renamed fields
- Optional toast confirmation
- Works on any admin Inputfield (including AJAX-loaded fields)
Requirements
- ProcessWire 3.0.0+
- PHP 7.1+
- Modern browser (current Chrome, Firefox, Edge, Safari)
Installation
- Copy the
FieldNameCopier folder to /site/modules/ (rename from FieldNameCopier-main if downloaded as a ZIP). - In the admin go to Modules → Refresh, then install Field Name Copier.
Usage
Hold the configured modifier key (default: Shift) and click the header/toggle of any Inputfield.
The field name is copied to the clipboard. The field does not collapse.
A small toast confirms the copy (if enabled).
Configuration
Modules → Field Name Copier → Configure
| Option | Default | Description |
|---|
| Modifier key | Shift | Shift, Alt / Option, Ctrl, or Meta (⌘) |
| Show toast | ✓ | Brief on-screen confirmation after copying |
Notes on modifier keys
- Shift (Recommended): Works consistently across macOS, Windows, and Linux.
- Alt / Option: Works on macOS and Windows; on some Linux desktops Alt+click is reserved for window dragging.
- Ctrl: Works on Windows and Linux; on macOS Ctrl+click opens the browser context menu instead of firing a click event.
- Meta (⌘): Intercepted by Windows; use only on macOS.
Behavior
- Active only for logged-in users on non-AJAX, non-CLI admin pages.
- Loads as a browser-cached external script via
$config->scripts with config passed via $config->js(). - Intercepts the click before ProcessWire’s accordion handlers collapse the field, while leaving links and header action icons untouched.
- Reads the machine name from
data-id / wrapper ID (stripping Repeater suffixes) and falls back to the field’s direct input name. - Works regardless of debug mode.
License
MIT License.