Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D9 - Fix the submission of default custom field value #862

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

jitendrapurohit
Copy link
Collaborator

Overview

Fix the submission of default custom field value

Before

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".

After

Fixed.

Technical Details

Update the #value with #default_value property.

Comments

Drupal Ticket: https://www.drupal.org/project/webform_civicrm/issues/3326150

@KarinG
Copy link
Collaborator

KarinG commented Mar 19, 2023

👍 I ran into this issue myself last week. Did you scan the code to check if we accidentally use ‘value’ instead of ‘default_value’ for other elements perhaps as well?

@jitendrapurohit
Copy link
Collaborator Author

yes, there are more than 10 such assignments. I think we should do a follow up PR after confirming the same issue on each of them. Hope thats fine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants