- 🇳🇱Netherlands Johan den Hollander
The #87 patch applies cleanly and does what it has to do. The inactive tab gets opened and shows the required field that was left empty.
The last submitted patch, 31: field_group-HTML5_validation_prevents_submission_in_tabs-2969051-31.patch, failed testing. View results →
The last submitted patch, 40: 2969051-40.patch, failed testing. View results →
I'm finding the #87 patch works, but I am still seeing the error in the console. Since an earlier patch I've used (#71) got rid of the console error, I was not expecting to see it.
- 🇪🇨Ecuador andres.torres
Hi All,
I'm reopening this since it still an issue when using the Multistep option. We have a contentype with 3 multi-groups under this scenario but unfortunately after upgrading to x.3.4 they stop working on the Admin side (not even user 1 can create content). I've applied the patch on #87 successfully but the issue persists, I have also disabled the HTML5 validation on ALL forms $form['#attributes']['novalidate'] = 'novalidate'; on a custom module. There are no permission implemented, as i mentioned not even user 1 can go through the second step (we have 3 steps using field group ) Works OK on the front end theme. Gin works ok for other contentypes without Field Group. Dont see any Javascript errors on console or any other php errors either.
- Status changed to Needs review
over 1 year ago 2:37pm 16 March 2023 - Status changed to Needs work
over 1 year ago 2:49pm 16 March 2023 - 🇮🇳India gaurav_manerkar Vasco Da Gama, Goa
Patch #87 doesn't work when the form is rendered via ajax.
- 🇮🇳India gaurav_manerkar Vasco Da Gama, Goa
I have updated sector and hv re-rolled patch #87.
- last update
about 1 year ago 18 pass - last update
about 1 year ago 18 pass - Status changed to Needs review
about 1 year ago 2:48pm 24 April 2023 - 🇦🇺Australia mstrelan
FWIW a similar problem was fixed in core for vertical tabs. See 🐛 Correct vertical tab does not focus on form validation Fixed
- Status changed to Needs work
12 months ago 4:12pm 5 July 2023 - 🇺🇸United States kevinquillen
Latest patch seems to have no effect in Gin and Field Group in Drupal 10.
- 🇨🇭Switzerland ayalon
The latest patch works for me with tabs on Gin in Drupal 9. Thanks a lot for the huge improvement.
- Status changed to RTBC
9 months ago 12:59pm 12 September 2023 - 🇺🇸United States dpagini
The last 2 comments are saying the opposite... could we maybe get more elaboration on #103? I'm using this patch with Claro and it is resolving this issue, so I'm going to put to RTBC, but with the caveat that I'm not testing in Gin and 103/104 are saying it's working/it's not.
- Status changed to Needs work
8 months ago 5:55am 9 October 2023 - 🇩🇪Germany Anybody Porta Westfalica
- First commit to issue fork.
- Merge request !40Ensure respective tab is opened when html validation for a field prevents form submission → (Open) created by sahal_va
- last update
7 months ago 24 pass - last update
7 months ago 24 pass - Status changed to Needs review
7 months ago 3:48am 11 November 2023 - 🇺🇸United States dianacastillo Miami
works for me in drupal 9.5 will this be in the latest version of the module soon?
- 🇬🇧United Kingdom aaron.ferris
Latest patch works well for me, Drupal 9.5.9 and Field Group 3.4.0.
- 🇳🇱Netherlands Helpermedia
Patch #100 works also well for me, Field Group 3.4 and Drupal 10.1.6 with Claro theme.
- last update
6 months ago 17 pass, 2 fail - First commit to issue fork.
- last update
6 months ago 17 pass, 2 fail - 🇧🇷Brazil brandonlira
The last patch #100 didn't work for me because https://www.drupal.org/project/drupal/issues/2722319 🐛 s using Text Editor always fail HTML5 validation when "required" is added via #states Needs work CKEditor removed the "required" attribute from the textarea during startup. So I adjusted the patch with these changes.
The last submitted patch, 114: 2969051-100.patch, failed testing. View results →
- last update
6 months ago 17 pass, 2 fail - 🇧🇷Brazil brandonlira
The last patch #100 didn't work for me because https://www.drupal.org/project/drupal/issues/2722319 🐛 s using Text Editor always fail HTML5 validation when "required" is added via #states Needs work CKEditor removed the "required" attribute from the textarea during startup. So I adjusted the patch with these changes.
The last submitted patch, 116: 2969051-100.patch, failed testing. View results →
- Status changed to Needs work
6 months ago 1:51pm 3 January 2024 - 🇫🇷France DYdave
Hi everyone,
Thanks a lot for raising this issue and contributing a patch, it's greatly appreciated !
I would like to confirm the patch from #116 applied properly with composer and seems to have fixed the issue in my case with the Gin admin theme and horizontal tabs (field_group), with the following versions:
- drupal/core: 10.2.0
- drupal/field_group: 3.4.0
- drupal/gin: 3.0.0-rc8
Client side validation now seems to be working properly by changing to the tab with the required field and focusing the right element.Thanks again very much for your help with this issue.
- 🇫🇷France DYdave
Correction:
After doing a little bit more testing, I've been having the following JS error with the patch from #116 after saving a content form:Uncaught TypeError: Cannot read properties of null (reading 'classList') tabs.js line 119 at Drupal.FieldGroup.fieldIsValid (tabs.js?119:34)
Which seems to correspond to the following line of code:
https://git.drupalcode.org/project/field_group/-/merge_requests/40/diffs...Added above at #113:
@brandonlira: Not sure exactly what use case that should cover but there might be a little bit more testing to be done, with perhaps a few more cases/checks to be added in the JS code.Reverted to using patch from #100 which fixed my validation issue without prompting this JS error on form save.
Thanks again everyone for the great help!
- 🇬🇧United Kingdom MrDaleSmith
I have a site where the node aded form for a content type has every element inside a collapsed fieldset: applying the patches in #100 and #116 still generated JS errors that silently prevented form submission when I trry to submit the form without filling anything.
- 🇫🇷France fwust Strasbourg
#116 worked for me in Gin admin theme with horizontal tabs. But when i add a paragraph with field groups, it doesn't work anymore
- 🇫🇷France MacSim
The patch provided in #100 and MR!40 does not fully work for me.
I use horizontal tabs with a Claro 10.2.5.
If there are required fields in another tab that haven't been filled out, the JS takes me to one of those other tabs when I add a paragraph to the current tab. - 🇫🇷France MacSim
Small update of patch provided in #100 🐛 HTML5 Validation Prevents Submission in Tabs Needs work in order not to break the behavior of adding a paragraph to a tab.
I tried
'.form-submit:not([formnovalidate,.field-add-more-submit])'
but it was not a valid selector (at least on firefox) ; so I just chained another :not() =>'.form-submit:not([formnovalidate]):not(.field-add-more-submit)'
and I am wondering if it's a good idea to have an array declaration in the first "not" since it's not well supported by all browsers yet. - Status changed to Needs review
2 months ago 12:22pm 10 April 2024 - First commit to issue fork.
- Merge request !51Issue #2969051 by gaurav_manerkar, julien, rp7: HTML5 Validation Prevents Submission in Tabs → (Open) created by jorgik