Custom field always set to default when "Reuse an existing set" is chosen

Created on 9 December 2022, about 2 years ago
Updated 14 May 2023, over 1 year ago

1.0 Problem/Motivation
When submitting a webform which updates a custom field, the value is always set to the default value (if there is one) when "Option type" is set to "Reuse an existing set".

2.0 Detailed steps to reproduce (embed screenshots)

  • Create a custom option group called "Test Option Group" with at least two options ( /civicrm/admin/options?action=browse&reset=1 )
  • Create a custom fieldset
  • Add a custom field called "No default". Field Input Type is "Drop-down", Option Type is "Reuse an existing set", then choose the newly created "Test Option Group".
  • Add another custom field called "With default", exactly the same as the one above.
  • Press "View/Edit Multiple Choice Options" and make one of the options the default
  • Create a webform and enable CiviCRM Processing with 1 Contact
  • Enable the newly created Custom Fieldset and both of its Custom Fields
  • Save the webform and open it pre-populated for a test Contact (e.g. /form/test-select-lists?cid=21110&reset=1 )
  • Choose one of the non-default options for both Custom Fields
  • Submit the form
  • Go back and reload the form, pre-populated for the same Contact
  • Observe that the Custom Field with a default value is pre-populated with the default, not the value which was chosen
  • Checking the Contact record, the custom field has been saved with the wrong value (it's not just a pre-populating issue)

3.0 Proposed resolution
It would be great if the default value could be set for multiple choice options without the form always submitting that value.

🐛 Bug report
Status

Fixed

Version

6.2

Component

CiviCRM Data Handling

Created by

🇦🇺Australia jude.hungerford

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