updateForm not working with block field module
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3560133. -->
Reported by: [szloredan](https://www.drupal.org/user/3531611)
Related to !1029
>>>
<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>Using the Block Field module trying to embed the Chat Block there is an Ajax error. The error is caused by empty form element trying to be rendered. The problems comes from updateForm ajax function that returns empty value for this case. The form element when using in block field return the entire form which breaks the updateForm logic.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<p>1. Install block_field module.<br>
2. Allow the AI Chatbot Block to be referenced in the new block field.<br>
3. Apply patch : <a href="https://www.drupal.org/project/block_field/issues/3536872">https://www.drupal.org/project/block_field/issues/3536872</a> -> This fixes another problem.<br>
4. Reference your AI Chatbot block and try to change the Assistant (this triggers the Ajax)<br>
5. Ajax error appears in console.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Change the updateForm to return the correct element from entire form objects.</p>
issue