verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 69 forks source link

[5.x] option `resetClasses` generates javascript errors with `classList.remove` #1873

Closed Megafry closed 1 month ago

Megafry commented 1 month ago

Describe the bug

The option resetClasses generates javascript errors with multi-page forms Dom Elements no longer have classes, therefore the javascript breaks

Uncaught DOMException: Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.

removeLoading(), removeTabErrors()

Steps to reproduce

  1. Create a new form
  2. Add multiple pages
  3. Add new mandatory fields
  4. Open the form in the frontend
  5. Go to the next page
  6. Check the console for errors

Form settings

Craft CMS version

5.1.1

Plugin version

3.0.0-beta.9

Multi-site?

No

Additional context

No response

engram-design commented 1 month ago

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.9".

engram-design commented 1 month ago

Updated in 3.0.0-beta.10