Address FWA should fetch multiple
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3576536. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !1265 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Short Description: </strong>[One-line issue summary for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The default mode of anyone gathering addresses is to gather multiple. Thus, the FWA button should be a wrapper for the field, not for each item.</p> <h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4> <p>1. Get and install the address module: <a href="https://www.drupal.org/project/address">https://www.drupal.org/project/address</a><br> 2. Make sure that AI Automators and Field Widget Action modules are enabled.<br> 3. Create a content type under <a href="https://drupal11-test.ddev.site/admin/structure/types/add">https://drupal11-test.ddev.site/admin/structure/types/add</a><br> 4. In label set "Address Creation"<br> 5. Click "Save and manage fields"<br> 6. Click "Re-use an existing field"<br> 7. Pick "Body" and click "Re-use"<br> 8. Click "Save Settings"<br> 9. Click "Create a new field"<br> 10. Pick "Address" as the field type<br> 11. Set the label to "Created Address"<br> 12. In "Allowed number of values" pick "Unlimited"<br> 13. Pick "Address" from the checkbox and click "Continue"<br> 14. Scroll down and check "Enable AI Automator"<br> 15. In the "Choose AI Automator Type" the "LLM: Address"<br> 16. In "Automator Base Field" pick "Body"<br> 17. In Automator Prompt write "Based on the context text return all addresses listed. Context: {{ context }}"<br> 18. Open "Advanced Settings"<br> 19. Pick "Field Widget" under "Automator Worker"<br> 20. Click Save.<br> 21. Goto form display for the content type: <a href="https://drupal11-test.ddev.site/admin/structure/types/manage/address_creation/form-display">https://drupal11-test.ddev.site/admin/structure/types/manage/address_creation/form-display</a><br> 22. On Created Address, click the cogwheel to edit the field settings.<br> 23. Open "Field Widget Actions"<br> 24. Under "Add new action" choose Automator Address and click "Add action"<br> 25. Check "Enable Automators"<br> 26. Open "Enable an Automator and click "Created Address Default"<br> 27. Click "Update"<br> 28. Click "Save"<br> 29. Go to Create Address Creation under <a href="https://drupal11-test.ddev.site/node/add/address_creation">https://drupal11-test.ddev.site/node/add/address_creation</a><br> 30. In the title write something whatever.<br> 31. In the body write "John lives at 123 Main St, Springfield, USA and works at 124 Main St, Springfield, USA"<br> 32. <strong>Expected</strong>: The button should wrap all items and generate two items when I click<br> 33. <strong>Instead</strong>: The button is on each field and when I add more, the previous dissapear or I have doublets.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Fix so it runs on wrapper</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[ ] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[ ] AI Assisted Code<br> This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p> <p>[x] AI Generated Code<br> This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p> <p>[ ] Vibe Coded<br> This code was generated by an AI and has only been functionally tested.</p>
issue