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

The form:errors example may be incorrect #453

Open
mariordev opened this issue Nov 5, 2019 · 0 comments
Open

The form:errors example may be incorrect #453

mariordev opened this issue Nov 5, 2019 · 0 comments

Comments

@mariordev
Copy link

I may be doing something wrong, but this is not working for me.

The example shown in content/collections/tags/form-errors.md states:

Note that since form:errors is a Tag rather than a variable, it should be wrapped with single braces when inside the conditional.

However, when I try exactly that, I get an error.

{{ form:set is="my_formset_handle" }}

    {{ if {form:errors} }}
        <p>There were some errors with your submission. Please fix them as indicated below and try submitting again.</p>
    {{ /if }}

    {{ form:create }}
        ...
    {{ /form:create }}
        
{{ /form:set }}

Screen Shot 2019-11-05 at 3 08 27 PM

NOTE: the formset does exist.

When I remove the single brackets from {{ if {form:errors} }} then it works fine.

Using Statamic v2.11.15

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

1 participant