Skip Navigation

[Resolved] Control access to Gravity Forms – specific forms and/or their entries

This thread is resolved. Here is a description of the problem and solution.

Problem:

I'd like to restrict User #7 to be able to read Gravity Form #15 and view its entries, but not know about or be able to access any other Gravity Form.

Solution:

If it is, I suggest you try these:

1) Setup the Gravity Form #15, when user submit the form to create the post, add a custom field "gravity-form-id" to the new post, the field value is number 15.

2) Then create a page, in the page content, you can get current user's ID with shortcode [wpv-current-user info="id"], use it in wpv-conditional shortcode to check if current user's ID is 7 then display the Gravity Form #15 shortcode + a post view:

filter by custom field "gravity-form-id" value is number 15

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-current-user

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Clifford 6 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1111701

I'd like to restrict User #7 to be able to read Gravity Form #15 and view its entries, but not know about or be able to access any other Gravity Form.

I found https://toolset.com/forums/topic/gravityforms_edit_entries/ from March 2017, but no updates since then.

Can Access accomplish this for me?

Thank you.

#1112128

Hello,

I assume you are going to achieve this:
Display the Gravity Form #15 and posts created with this form for a specific user(#7) only.

If it is, I suggest you try these:
1) Setup the Gravity Form #15, when user submit the form to create the post, add a custom field "gravity-form-id" to the new post, the field value is number 15.

2) Then create a page, in the page content, you can get current user's ID with shortcode [wpv-current-user info="id"], use it in wpv-conditional shortcode to check if current user's ID is 7 then display the Gravity Form #15 shortcode + a post view:
filter by custom field "gravity-form-id" value is number 15

More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-current-user
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

#1114468

I think you assumed by "entries" I meant "posts created with this form"

Actually, I meant the Gravity Form's entries, within wp-admin. For example:

/wp-admin/admin.php?page=gf_entries&id=15
#1114791

Yes, as I mentioned above, you just need to store the Gravity Form's entries ID (15) into a post field, then you can use it in wpv-conditional shortcode
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-conditional

#1114976