The country of existing contacts is previewed wrongly when locked

Created on 13 August 2025, about 2 months ago

Problem/Motivation

If I create a form where users can search for an existing contact, the preview displays a wrong country if it is locked.

<!--break-->

Detailed steps to reproduce

Create a new webform, then:

Add existing contact

  1. Go to CiviCRM
  2. Check Enable CiviCRM Processing
  3. Number of Contacts: 1
  4. Under 1. Contact 1Contact Fields Make sure that Existing Contact is checked
  5. Set Number of Address Fields: 1, check Country and uncheck everything else
  6. Click Save Settings

Enable autocompletion and lock fields

  1. Go to Build
  2. Edit Existing Contact
  3. Set Form displayForm Widget to Autocomplete
  4. Under Contact Field Handling
    • Set Fields to Lock to Name and Address
    • Set Locked fields should be to Disabled
    • Check Submit disabled field value(s)
  5. Click Save

Enable form preview

  1. Go to SettingsForm
  2. Set Form preview settingsEnable preview page to Required
  3. Click Save

Fill form and notice problem

  1. Navigate to the form
  2. Notice that the field Country is disabled, but United States is selected
  3. Search for an existing contact not from the United States
  4. Notice that the field Country changed
  5. Preview the form and notice that the country is set to United States again

🐛 Bug report
Status

Active

Version

6.3

Component

Webform/Drupal

Created by

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

Comments & Activities

Production build 0.71.5 2024