Skip Navigation

[Resolved] Front end form – field only show posts author of

This support ticket is created 3 years, 9 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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by matthewL-7 3 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1966917

Hi

I have set up a front end form for a user to add a new "offer" to the site, one of these fields is "program" which is another CPT which currently lists all programs. I would like it to only list programs they are the author of, as they should only be able to add offers to their "programs".

Is this possible? Seems like something that other people may have tried to do but I couldn't manage to find anything on the forums.

Thanks

#1967601
relationship-fields-example.png

Hi,

Thank you for contacting us and I'd be happy to assist.

In the "Program" selection field's setting, you can select the "Get only options by the current author" option for this.
( example screenshot attached )

Note: in case you're using the expert mode, you can add attribute author='$current' to the cred_field shortcode for this field.
( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field )

regards,
Waqar

#1968423

Awesome that works great, I was using the advanced editor so I never saw those options. Cheers 🙂