Cannot fill in FormBuilder fields when using Existing Contact autocomplete
Overview
On FormBuilder forms that use autocomplete option "Existing Contact", users cannot fill in other fields. If it is a text box that was not filled in by the autocomplete, then the user is unable to type anything. If the text box was filled out by the autocomplete, then any changes made to that field are temporarily visible, but disappear. Selects and checkboxes may be clicked, but those changes are also temporary. Even if the user does not search/select a contact, then they still cannot fill out the form.
Reproduction steps
- Create a FormBuilder form based on a contact (i.e. Organization)
- Add an "Existing Contact" field, as well as one text box field for testing (i.e Email)
- Save, and click View Page
- Try to type into the text box field, both before and after selecting a contact
Here is the markup for the form that I tested on in dmaster:
<af-form ctrl="afform">
<af-entity data="{contact_type: 'Organization', source: 'Test'}" type="Contact" name="Organization1" label="Organization 1" actions="{create: true, update: true}" security="RBAC" />
<fieldset af-fieldset="Organization1" class="af-container" af-title="Organization 1">
<div class="af-container">
<af-field name="id" />
<div class="af-container af-layout-inline"></div>
</div>
<div af-join="Email">
<div class="af-container af-layout-inline">
<af-field name="email" />
</div>
</div>
</fieldset>
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit</button>
</af-form>
Current behaviour
When a FormBuilder form has an "Existing Contact" autocomplete, users cannot fill in or edit fields.
Expected behaviour
Users should be able to fill out or edit fields with an "Existing Contact" autocomplete on the form.
Environment information
This type of form does not work on 5.57.1, but does work on 5.56.2.
I did a git bisect
and located the first bad commit as 2aaaa86b, which is PR 24974 (Use APIv4-based Autocomplete widget throughout SearchKit, Afform & API Explorer)