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.
- Drupal 8.2.3
- Create a new Contact Form: /admin/structure/contact/add
- Include required fields in your new form
- Activate Page Load Progress for your new form: /admin/config/user-interface/page-load-progress
- Navigate to your new from -- but do not enter any data into the required fields -- and then press the form's "Send Message" button
- The Page Load Progress will activate and the user will not be able to see the required fields error message, nor will the user be able to enter data into the required fields and then resubmit the form
In my opinion, the Page Load Progress throbber should not activate until after the form has passed validation, otherwise, the user experience is pretty much destroyed.
Comments
Comment #2
anavarreThanks, confirmed. For site admins, it's possible to kill the throbber by pressing the ESC key, but end users wouldn't know and would simply be stuck.
As a workaround, you can decide to exclude page_load_progress from being triggered on the page causing the issue. You can do so from within the visibility conditions section under
/admin/config/user-interface/page-load-progress
- E.g. by adding/contact/contact_us
if that was the relative path to your custom contact form. Do not forget the prefixing slash.Comment #3
Q2U CreditAttribution: Q2U commentedThank you. Unfortunately the nodes on which I need Page Load Progress to function are the same nodes on which this validation issue manifests. Drat. Page Load Progress is, in my opinion, a blessing for the user experience...but this issue on these specific pages means I can't run PLP. Have you determined -- or do you have an opinion -- as to whether (or not) you will fix this validation issue?
Thanks again...good idea and good module.
Comment #4
anavarreHaven't yet, as I need to dive into the JS validation issue first. Definitely something I'm willing to fix one way or another. Stay tuned.
Comment #5
anavarreSo, we sat down with Dom. to discuss the issue and here's what's happening:
.form-submit
for page_load_progressHere's a sample implementation:
Comment #6
Q2U CreditAttribution: Q2U commentedAny progress on this issue?
Comment #7
anavarreSo, we think the best path forward is likely to restrict the module to
.form-submit
only. The reason is it's very low-level and if you want to override it you really, really have to put efforts into not using it. Also, allowing any CSS class or ID might be us over-engineering the real-life use cases people actually have. We'd rather keep things simple for 99% of our user base and explore edge cases on a case-by-case basis.So we'll proceed with this plan. This will quite significantly reduce the module complexity.
Comment #8
anavarreLinked to #2883036: Explore supporting only .form-submit or add a new class for exploring options.
Comment #9
anavarreThe patch in #2883036: Explore supporting only .form-submit or add a new class should fix the issue since we've now changed the JS behavior to account for HTML 5 validation. Please follow the other issue. It'll soon be committed to dev and I'll tag a new release next.
Comment #10
anavarreAnd it's in the new release https://www.drupal.org/project/page_load_progress/releases/8.x-1.2