State Province Id lost after validation

Created on 6 June 2025, 2 months ago
Updated 10 August 2025, 3 days ago

1.0 Problem/Motivation

After selecting CRM field State/Province on webform and submitting form, field walue is lost if other field return error and form is not submitted.
Country is selected but this field is empty

2.0 Detailed steps to reproduce (embed screenshots)

Simple as it is, add contact to form with full adress and submit form, add other field that return error after submit, s form will not process.

3.0 Proposed resolution

This fix problem for me. Question is: should it be done better ?

webform_civicrm/src/FieldOptions.php:32

elseif ((strpos($name, 'state_province_id') !== false) || (isset($field['type']) && $field['type'] === 'civicrm_number')) {

to

elseif (isset($field['type']) && $field['type'] === 'civicrm_number') {
🐛 Bug report
Status

Active

Version

6.0

Component

Webform/Drupal

Created by

🇵🇱Poland artur.smigielski

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024