silverstripe/silverstripe-elemental

FormBuilder validation message does not show for TextCheckboxGroupField

Closed this issue · 6 comments

TextCheckboxGroupField is a CompositeField used by elemental

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

image

image

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

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

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.

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

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

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