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

No error output for cookie groups #96

Open
mikewink opened this issue Oct 4, 2022 · 1 comment
Open

No error output for cookie groups #96

mikewink opened this issue Oct 4, 2022 · 1 comment

Comments

@mikewink
Copy link
Contributor

mikewink commented Oct 4, 2022

There is an issue with saving a cookie group. None of the required fields is marked. When I try to save the form, it redirects me back to the README with an error message.

I can see that the there are validation rules in place for name and description, but no errors are displayed after attempting to save the group with empty form fields.

I guess adding a required: true on the two form fields would be a first step, but the underlying issue is the missing error messages, I think.

templates/_includes/group.twig

{{ forms.textField({
    id: "name",
    label: group.getAttributeLabel('name'),
    name: "name",
    disabled: disabled,
    required: true, <-- new attribute!
    value: group.name,
    errors: group.getErrors("name"),
}) }}

{{ forms.textAreaField({
    id: "description",
    label: group.getAttributeLabel('description'),
    name: "description",
    disabled: disabled,
    required: true, <-- new attribute!
    rows: 4,
    value: group.description,
    errors: group.getErrors("description"),

}) }}
@jellingsen
Copy link
Contributor

Thank you, I'll have a look at it.

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

No branches or pull requests

2 participants