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

[2.1.41] Submission query - "form" parameter cannot be used with multiple form handles #2301

Open
piotrpog opened this issue Feb 21, 2025 · 2 comments

Comments

@piotrpog
Copy link

Describe the bug

When i create submission query query with "form" parameter, only submissions from form with handle 'c' are returned.

        $query = Submission::find()->form([
            'a',
            'b',
            'c',
        ]);

If i remove 'c' from array, only submission from form with handle 'b' are returned.

        $query = Submission::find()->form([
            'a',
            'b',
        ]);

So, It seems that if we use "form" query parameter with array of handles, only the last element of array is used.

Steps to reproduce

Form settings

  • Multi-page form: Yes or No
  • Submission Method: Ajax or Page Reload
  • Client-side Validation: Yes or No
  • Custom Form Templates: Yes or No

Craft CMS version

4.14.4

Plugin version

2.1.41

Multi-site?

Yes

Additional context

No response

@engram-design
Copy link
Member

This is "correct" behaviour for the moment, as querying across different forms is a bit of a limitation, due to the different fields available for each form and difficulties resolving field layouts correctly.

@piotrpog
Copy link
Author

@engram-design
Thank you for explaining. in this case, docs should be updated, because they mention possibility of querying by multiple form handles:
https://verbb.io/craft-plugins/formie/docs/getting-elements/submission-queries#form

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