You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For compound fields such as the lat/long field in addresses, the error summary doesn't link to the field when those fields are required but left empty.
The fields are also missing the error styling and messaging.
We discovered this when adding our own compound fields using a fieldset. It would be nice if BaseNativeField could handle errors in this situation nicer overall i.e. error summary and individual error styling on fields. The .input.errors > .text selector that applies the border doesn't work if you have a set of fields wrapped in a container div.
Note: We are using BaseNative field with useFieldset, true.
The subfields in the src/fieldlayoutelements/addresses/LatLongField.php were missing the data-error-key attribute. After adding this attribute to the latitude and longitude field, the errors on the fields show as expected and the error summary links work as intended. If you add this attribute to your compound field’s subfields, the errors and the summary should work as expected.
What happened?
Description
For compound fields such as the lat/long field in addresses, the error summary doesn't link to the field when those fields are required but left empty.
The fields are also missing the error styling and messaging.
We discovered this when adding our own compound fields using a fieldset. It would be nice if
BaseNativeField
could handle errors in this situation nicer overall i.e. error summary and individual error styling on fields. The.input.errors > .text
selector that applies the border doesn't work if you have a set of fields wrapped in a container div.Note: We are using BaseNative field with
useFieldset
, true.Steps to reproduce
Expected behavior
Focus is set to the field when clicking the link.
Actual behavior
Focus isn't set.
Craft CMS version
5.5.3
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: