Closed gregorydavidjenkins closed 3 months ago
That does seem to be working for me correctly. Can you show me the output for the error and success alert? I'm also testing with the Tailwind config.
I get a:
<div class="rounded-md bg-red-50 border border-red-200 text-sm text-red-700 p-4 mb-4" role="alert" data-fui-alert="" data-fui-alert-error="">Couldn’t save submission due to errors.</div>
Sure! Here is the relevant chunk from my themeConfig (mostly just Tailwind stuff from your example, maybe some small changes, can't remember).
alertError: {
attributes: {
id: 'test-id',
class: 'bg-red-50 border border-red-200 text-sm text-red-700 p-4 mb-4',
},
},
And the output is:
<div id="test-id" role="alert" data-fui-alert="" data-fui-alert-error="">Couldn’t save submission due to errors.</div>
Success alerts are working as expected.
<div class="bg-green-50 border border-green-200 text-sm text-green-700 p-4 mb-4" role="alert" data-fui-alert="" data-fui-alert-success="">Submission saved.</div>
Ah, looks like this is for Ajax-forms. Should be fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.4"
.
Thanks!
Fixed in 3.0.0-beta.5
Describe the bug
I'm using the pre-made tailwind themeConfig examples from the documentation, with a few color and spacing changes. The alertSuccess classes are applied correctly, but the alertError classes are not applied correctly.
Steps to reproduce
Form settings
Craft CMS version
5.0.0-RC1
Plugin version
3.0.0-beta.4
Multi-site?
No
Additional context
Oddly I am able to add other attributes to the alerts using the same syntax, for example an "id" or a "data-custom-attribute" of some sort.