Field Widget Action for classification Automator on options_select widget
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3534853. -->
Reported by: [anjaliprasannan](https://www.drupal.org/user/3637917)
Related to !728
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>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.</p>
<p>This issue implements the Field Widget Action plugin for the **Entity Reference field pointing to taxonomy terms**, using the **Options Select widget** (`options_select`) and the `llm_classification` AI Automator. This allows automatic classification of content into taxonomy terms (e.g., topics, categories, tags) using AI.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ul>
<li>In the <code>AI Automators</code> module, create a new Field Widget Action plugin under <code>src/Plugin/FieldWidgetAction</code>.</li>
<li>Name the plugin file <code>LlmClassificationOptionsSelect.php</code>.</li>
<li>Use the <code>FieldWidgetAction</code> attribute and connect it to:
<ul>
<li><code>field_types</code>: <code>entity_reference</code></li>
<li><code>widget_types</code>: <code>options_select</code></li>
</ul>
</li>
<li>Set the <code>formElementProperty</code> to <code>target_id</code> and configure <code>aiAutomatorsAjax</code> to populate the correct option based on LLM output.</li>
<li>Manually test that the Automator correctly selects a term from the select list, and attach a video of this working to the issue (or request a reviewer to do so).</li>
<li>(optional) Add a kernel test to validate the AJAX response.</li>
<li>(optional) Add a functional JavaScript test to verify the UI interaction.</li>
</ul>
> Related issue: [Issue #3534445](https://www.drupal.org/node/3534445)
issue