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 js validation on required checkbox fields #875

Merged
merged 1 commit into from
May 14, 2023

Conversation

jitendrapurohit
Copy link
Collaborator

Overview

Incorrect validation submitting webform with mandatory checkboxes

Before

If a checkbox field is populated after selecting a contact in the autocomplete field, the required attribute still complains of being required even if an option is checked using ajax.

image

After

Form submits without any validation error.

Technical Details

Looks like webform assigns required=required attribute to the first checkbox element. Triggering a change event on the 3rd checkbox does not toggle the required attribute from the first option. Hence removing it separately.

Comments

Related drupal ticket - https://www.drupal.org/project/webform_civicrm/issues/3355974

@jitendrapurohit
Copy link
Collaborator Author

D10 test seems to be failing due to this PR merged in civicrm - civicrm/civicrm-drupal-8#82

@KarinG KarinG merged commit 01e85f6 into colemanw:6.x May 14, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants