Skip Navigation

[Resolved] Filter items in post relationship fields on author = current user

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

Problem:
When selecting parent posts in a CRED form to publish child posts it would be a useful feature to be able to only show parent posts authored by the current user.

Solution:
This currently requires custom code, but will be added as a built-in feature with the new post relationships coming with Types 3.0. It won't appear in the very first release, but in an update soon afterwards.

This support ticket is created 6 years, 2 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#618332

I would like a feature in CRED to filter post relationship fields, to only show posts where the author = current user.
It would be great if there was a on/off checkbox for this filter, when you add the post relationship field to the form.

Example.
User role "Organizer" can create "Events" and "Artists". When they create an "Artist" via a CRED frontend form they must select which "Event" the "Artist" belongs to. They are however not allowed to connect the "Artist" to an "Event" that they haven't created themselves.

#618561

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Tina

I have helped others with something similar before and it gets a little messy with the involvement of the select2 js library used when there are potentially many parent posts to choose from, so having such a feature built-in is a very sensible idea.

I have passed it on to Beda who is currently handling requests (in preparation for a public system where you will be able to vote on requests).

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.