All case studies

DEV3 Technologies · own product

DEV3 AI Field Filler for ACF: type-aware AI values for custom fields, checked against ACF's own validation

Our own WordPress plugin for Advanced Custom Fields and Secure Custom Fields: it fills a post's custom fields from its content with the Google Gemini API, using a schema built from each field's settings, then checks every value with its own codec and ACF's validation before saving.

Industry
Content Management (WordPress)

Live project preview

Client systems are private — screenshots shown where permitted.

DEV3 Technologies · own product — screenshots
Filling an ACF field group: every field shows its current and proposed value, its type and a validity check before anything goes into the form.

Filling an ACF field group: every field shows its current and proposed value, its type and a validity check before anything goes into the form.

The challenge

Sites built on ACF often have dozens of custom fields per post: specs, prices, dates, choices, related posts and images. Filling them by hand is slow, and generic AI writers treat every field as free text. They invent choices that don't exist, write "about 13 kg" into a number field, return dates in the wrong format and link to posts that were never published. We needed AI values that respect each field's type, limits, choices and relationships, pass the same validation an editor's input would, can be reviewed one field at a time, and can be undone.

Our solution

We built DEV3 AI Field Filler for ACF as a PHP plugin with a React admin app and buttons inside ACF's own meta boxes in the block and classic editors. A codec sits between ACF and the AI in both directions.

Key design decisions

  • A schema per field. Each ACF field becomes part of a structured-output schema: maxLength from the character limit, minimum and maximum for numbers, an enum of choice values, objects for links and groups, arrays of rows for repeaters and a layout enum for flexible content.
  • Real candidates only. Relationship, post object, taxonomy, user, image and gallery fields get a list of real candidates built from the field's own filters, and the schema only allows those ids. Fields with no candidates aren't asked at all.
  • Normalise, then validate twice. Every returned value goes through a type-aware normaliser (clamp and step-round numbers, map choice labels to values, parse dates into ACF's storage formats, re-check post type and status) and then through ACF's own acf_validate_value(), including any custom acf/validate_value filters.
  • Explain every change. When the codec shortens text, clamps a number or drops an invalid choice, it adds a note. Invalid values are flagged and can't be applied until edited.
  • Per-field instructions in ACF. A DEV3 AI tab in ACF's field settings stores instructions and a skip switch on the field itself, so they travel with local JSON and exports.
  • History and undo. Every applied value records before and after, including whether the field existed, so undo can restore or delete.

Architecture

In the editor, "Fill with DEV3 AI" works per field or per field group and opens a review modal with current and proposed values; accepted values go into the ACF form and are saved with the post. Bulk fill drafts values for many posts in a background job into a review queue with accept-all and batch undo. The field-group generator turns a plain description into a reviewed field group, created in the database or as a local JSON file. A basic mode fills fields without AI from the post's own content. The API client and jobs come from a shared core used across DEV3's plugins.

Results

The plugin is complete. It ships in the DEV3 AI Content, SEO & Site Tools Plugins Bundle on the DEV3 marketplace, alongside 6 other content and site plugins, and is being prepared for CodeCanyon. What was built and verified:

  • 58 PHPUnit tests in wp-env with ACF and Secure Custom Fields, covering schemas, number clamping and step rounding, choice mapping, date formats, relationships limited to real allowed posts, ACF's native and custom validation, editor logging, bulk runs and batch undo
  • 43 Jest tests, including the ACF form bridge, value editors and the review modal
  • Repeater, flexible content and gallery values follow ACF's documented formats and are unit-tested with stub fields
  • The AI paths (field fill, field-group generator, image prompts) were tested with mocked API responses; a run with a live key is the next step
  • Known limit: options pages, terms and users are not filled yet; post fields are

Setup guide

No licence key or activation is needed: install the zip and every feature works.

Requirements

  • WordPress 6.0 or newer and PHP 7.4 or newer
  • Advanced Custom Fields 6.0 or newer (free or Pro) or Secure Custom Fields, active
  • Repeater, flexible content and gallery fields need ACF Pro or Secure Custom Fields
  • Optional: a Google Gemini API key. Without one, basic fill, field-group templates, the review queue, history and undo still work

1. Install the plugin

  1. Unzip the bundle download and find dev3-ai-content-seo-site-tools-plugins-bundle/dev3-ai-acf-field-filler/dev3-ai-acf-field-filler.zip.
  2. In WordPress, go to Plugins → Add New → Upload Plugin, choose the zip and click Install Now.
  3. Click Activate. DEV3 AI Field Filler for ACF appears in the plugin list and its menu, DEV3 AI Field Filler, appears in the admin sidebar.

2. Connect Google Gemini (optional)

  1. Create a free API key in Google AI Studio (sign in with a Google account, then Create API key).
  2. Go to DEV3 AI Field Filler → API Config, paste the key and click Validate & save. The key is stored encrypted and never sent to the browser.
  3. Optional: pick the model (gemini-2.5-flash is the fast default; gemini-2.5-pro for the highest quality) and set a monthly budget.

Prefer config files? Add define( 'DEV3AF_GEMINI_API_KEY', 'your-key' ); to wp-config.php instead.

3. Set it up

  1. Open DEV3 AI Field Filler → Dashboard to check that ACF or Secure Custom Fields is detected, whether the local JSON folder is writable, and how many fields can be filled.
  2. In Field groups, see every group and which fields are fillable. Fields such as passwords, maps and layout fields are skipped.
  3. Optional: in ACF → Field Groups, open a field and use its DEV3 AI tab to add Instructions for DEV3 AI (for example "Upbeat, under 60 characters") or switch on Skip in DEV3 AI.
  4. In Settings, choose the post types, language and tone, the image policy (media library, generated, or library then generated), whether new taxonomy terms are allowed, and whether bulk fill only touches empty fields by default.

Updating

Download the new bundle version, then upload the plugin zip in Plugins → Add New → Upload Plugin and choose Replace current with uploaded. Settings, drafts and history are kept.

Uninstalling

Deactivate and delete the plugin from Plugins. Drafts and history are kept unless you turn on the delete-data-on-uninstall option first. Field values and field groups you created stay in ACF.

How to use

Fill a field group while editing a post

  1. Write or open a post in the block or classic editor. Each ACF field has a DEV3 AI button next to its label, and each field group box has a button to fill the whole group.
  2. Click the group button. The DEV3 AI · Fill modal shows every field with its current value, the proposed value, its type and a Valid check.
  3. Untick fields you want to leave alone, use Edit value to adjust one, or add Extra instructions and click Regenerate.
  4. Click Apply. The values go into the ACF form, and a toast offers Undo. Save or update the post to keep them.
  5. No API key? Switch the modal to Basic (no AI) to fill from the post's own text, such as "Label: value" lines, emails, dates and the featured image.

Fill many posts at once

  1. Open Bulk fill, or select posts in the Posts list and choose Fill ACF fields with DEV3 AI from the bulk actions.
  2. Choose the post type, field group, fields and filters. Keep "only empty fields" on to leave existing values untouched. Pick DEV3 AI or Basic and start the run.
  3. Drafts go to Review queue. Accept, edit or reject each one, select several and accept them together, or accept every draft of the run.
  4. Changed your mind? Undo a single value, or the whole run, from History.

Generate a field group from a description

  1. Open Group generator and describe the data you need, for example "Group ride: date, start time, meeting point, distance in km, level easy/steady/fast, price, booking link, route photo, ride leader". Or start from a template.
  2. Click Generate with DEV3 AI. Review the draft: rename fields, change types, edit choices, set required fields, and check the JSON and PHP tabs.
  3. Pick Database (ACF › Field Groups) or Local JSON file, then click Create field group.

Fill image fields

  1. Image, file and gallery fields are filled from your media library, matched by title, alt text, caption and file name.
  2. When nothing fits and generation is allowed, the draft holds an image prompt instead. Click Generate preview, check the image, then accept it to save it to the media library with alt text.

Related case studies