AxeWP / wp-graphql-gravity-forms

GraphQL API for interacting with Gravity Forms.
GNU General Public License v3.0
164 stars 29 forks source link

How can i show form entries to non-auth users? #393

Closed edikamy closed 9 months ago

edikamy commented 9 months ago

Description

I want to implement feedback for my users i use a form for get feedbacks and now i want to show other users feedback in feedback page but list of submitted entries just accessible with authenticated users i couldn't find any way to do this

my Question is: How can i show form entries to non-auth users as public?

Steps to reproduce

1- create a form 2- download and active wpgraphql and wp-graphql-gravity-forms 3- in GraphQl playground use a query like this: { gfSubmittedEntries(where: {formIds: ["21"]}) { nodes { id } }

In response i expect to can see, all entries for form 21 as a non-auth user

Additional context

No response

Plugin Version

0.12.4

Gravity Forms Version

2.8.1

WordPress Version

6.4.2

WPGraphQL Version

1.20.0

Additional enviornmental details

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have disabled ALL plugins except for Gravity Forms, WPGraphQL, and WPGraphQL for Gravity Forms

justlevine commented 9 months ago

Hey @edikamy

That's default Gravity Forms behavior. You should be able to view the entry submitted to the mutation in the gfSubmitForm response.

You should be able to use the graphql_gf_can_view_entry filter to change this default behavior.

Just make sure you're doing some sort of check so you're not showing all users on all entries.

Closing this ticket - if you've got questions on usage, feel free to open a GH Discussion or post in the Slack #gravity-forms channel, or open up a new ticket if you come across any bugs 😎