Field Widget Action for llm_number Automator on number widget (integer, float fields)

Created on 8 July 2025, 8 days ago

Problem/Motivation

The Field Widget Action module is merged into 1.2.x, however we need to start adding Automators plugins to it. The parent issue #3534445: Parent Issue: Create Field Widget Actions plugins for Automators. is a parent issue for all the implementations of the Automators plugins. Read more in the parent issue.

This issue implements the Field Widget Action plugin for the **Integer** and **Float** field types using the **Default number widget** (`number`) and the `llm_number` AI Automator. This will allow automatic suggestion of numerical values (e.g., quantities, ratings, scores) based on the surrounding context using a language model.

Proposed resolution

  • In the AI Automators module, create a new Field Widget Action plugin under src/Plugin/FieldWidgetAction.
  • Name the plugin file LlmNumberNumberDefault.php.
  • Use the FieldWidgetAction attribute and connect it to:
    • field_types: integer, float
    • widget_types: number
  • Set the formElementProperty to value and configure the aiAutomatorsAjax to use populateAutomatorValues().
  • No special clearEntity handling is required for this field type.
  • Manually test that the Automator correctly fills the numeric field with a suggested value, and attach a video of this working to the issue (or request a reviewer to do so).
  • (optional) Add a kernel test to validate the AJAX response.
  • (optional) Add a functional JavaScript test to verify the field interaction and Automator output.
Feature request
Status

Active

Version

1.2

Component

AI Automators

Created by

🇮🇳India anjaliprasannan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024