Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormBuilder validation message does not show for TextCheckboxGroupField #1154

Closed
emteknetnz opened this issue Feb 26, 2024 · 6 comments
Closed

Comments

@emteknetnz
Copy link
Member

TextCheckboxGroupField is a CompositeField used by elemental

FormSchema validation messages from inline submit do not show the red message

image

image

@GuySartorelli
Copy link
Member

Is this a problem for just the specific field you've mentioned, or does this affect all composite fields?

@emteknetnz
Copy link
Member Author

Haven't tested, will need be checked as part of fixing this issue

@GuySartorelli
Copy link
Member

It affects the priority imo. I probably wouldn't bother with this if it's just that field, but if it's all composite fields then it's worth looking at.

@emteknetnz
Copy link
Member Author

I'd expect it to only be the TextCheckboxGroupField which lives in elemental rather than admin, because I can get a message to show if I stop passing the noHolder: true prop in TextCheckboxGroupField.js, though it messes up styling for the form field

@GuySartorelli GuySartorelli transferred this issue from silverstripe/silverstripe-admin Feb 29, 2024
@lerni
Copy link

lerni commented Feb 29, 2024

IMHO impact is more than low. Finding elements to associate or link is not feasible without title/name.

@emteknetnz
Copy link
Member Author

emteknetnz commented Feb 29, 2024

I've done a little more investigation, the issue here is really whether the noHolder props is passed the field rendered by formbuilder which causes the message (validation message) to not be rendered - https://github.com/silverstripe/silverstripe-admin/blob/2/client/src/components/FieldHolder/FieldHolder.js#L183.

So this isn't a bug, it's a feature.

I've resolved this for TextCheckboxGroupField in elemental in this PR by removing the noHolder prop for the Title field and updating CSS so it still looks as it did before

I've close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants