formie
formie copied to clipboard
Issue with Stripe and resetClasses
Describe the bug
The Stripe payment doesn't work if resetClasses is enabled.
The script is not able to resolve this.form.getClasses("errorMessage")
Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '.' is not a valid selector.
removeError() {
s(this.$field, this.errorClass);
const e = this.$field.querySelector(`.${this.errorMessageClass}`);
e && e.remove()
}
Steps to reproduce
- Import this form - formie-testForm.json
- Set the
resetClassestotrue - Try to submit the Stripe payment form.
- The console shows errors
Form settings
- Multi-page form: No
- Submission Method: Ajax
- Client-side Validation: Yes
- Custom Form Templates: Yes
Craft CMS version
5.4.4
Plugin version
3.0.8
Multi-site?
no
Additional context
No response
Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.8".
Fixed in 3.0.9