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

dev/core#1928 Fix HTML5 error due to required attribute being set swi… #18080

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

seamuslee001
Copy link
Contributor

@seamuslee001 seamuslee001 commented Aug 6, 2020

…tch to using a class as jquery.validation picks up the class as well

See: https://lab.civicrm.org/dev/core/-/issues/1928

Overview

To reproduce the error create a custom field set that applies to any activity and that is collapsed by default and have a radio varchar field added that is required. Go to create a custom field and find you cannot submit form due to an console error.

Before

Cannot create new cases with a hidden required radio field

After

Radio field still properly validated and also still picked up by jquery validation

ping @demeritcowboy @eileenmcnaughton @totten

…tch to using a class as jquery.validation picks up the class as well
@civibot
Copy link

civibot bot commented Aug 6, 2020

(Standard links)

@civibot civibot bot added the master label Aug 6, 2020
@totten
Copy link
Member

totten commented Aug 6, 2020

r-run: Tested before and after the patch. It now shows a decent error message about the omitted field. 👍

@demeritcowboy
Copy link
Contributor

Thanks for the PR and thanks for testing. Just want to clarify there's (at least) two places to check here:

  1. The case activity form, where jquery validation doesn't seem to be active, so there this is about html5 getting in the way.
  2. Profiles used on contribution pages that contain required radios, where jquery validation is active, and what the original PR and problem-ish warning was about, which led to another PR which led us here. I just tested that spot and that's still working.

@seamuslee001 seamuslee001 merged commit 5a4651d into civicrm:master Aug 6, 2020
@seamuslee001 seamuslee001 deleted the dev_core_1928 branch August 6, 2020 03:54
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.

3 participants