Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Chrome is trying to validate required fields that are hidden because they are conditional. See http://stackoverflow.com/a/7264966/1177774 for more details. This patch fixes it.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-2405621-0-4.txt | 1.28 KB | jsst |
#4 | webform_conditional-chrome-blocking-submit-on-required-fields-2405621-4-D7.patch | 2.99 KB | jsst |
chrome-required-field.patch | 2.92 KB | jibran |
Comments
Comment #1
larowlan+1
Comment #2
jsst CreditAttribution: jsst at Ibuildings commentedI can confirm this patch works as expected.
I don't see how this module is usable with required conditional fields without it.
A required but hidden input field causes this error in chrome: "An invalid form control with name='' is not focusable.".
Comment #3
jsst CreditAttribution: jsst at Ibuildings commentedRTBC -> needs work: there's an edge-case where all components in the same fieldgroup are erroneously set required. Will provide details later.
Comment #4
jsst CreditAttribution: jsst at Ibuildings commentedThe edge-case I mentioned in my previous comment was a dependent fieldset. All components in a dependent fieldset were marked required in the original patch. I've updated the patch to solve this issue.
Comment #5
jsst CreditAttribution: jsst at Ibuildings commentedAdded interdiff to show the difference between the original patch and the #4 patch.