Skip Navigation

[Resolved] Limit parent posts in Form select field to user’s own posts

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

Problem:
How to limit the parent posts in Form parent select field to user's own posts.

Solution:
You can now manually add the attribute author="$current" to the cred_field shortcode for the parent selector.

This support ticket is created 6 years, 5 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+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by PiotrO586 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#915115

Hi,

I have a form where I need to select parent post. I'd like to restrict parent posts only to these belonging to the logged user. For Types 3.0, is this approach still valid:
https://toolset.com/forums/topic/cred-field-showing-too-many-option-in-form-select-box/
or there is another way to do it resulting from the software update?

#915193

Nigel
Supporter

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

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

Hi Piotr

I'm happy to say that we improved this on the latest plugin updates, though I'm not sure it is well documented.

When you insert the parent selector field in the form (which would be added if you auto-generate the form markup) you can add the attribute author="$current" so that the select dropdown only includes parent posts authored by the current user.

I just tested using it for the first time and it works.

#915282

Thank you Nigel, it works as expected.