Skip Navigation

[Resolved] limit logged in user to only ceate 1 post

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

Problem:
How can we limit users to submit a Form just once?

Solution:
There are several ways to achieve this but no inbuilt one.

One way is explained here.
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/#how-do-i-prevent-users-from-creating-more-than-one-contractor-post

Another way is to wrap the Form in an HTML condition, which listens to a post count of the user.
This requires a custom code snippet, which then you can use to produce a shortcode or function to use in the HTML Conditional.
https://kb.onthegosystems.com/code-snippet/count-post-amount-per-user/
You can use the above snippet, it will then be possible to use the function in an HTML condition:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-custom-functions-in-conditions/

This support ticket is created 5 years, 8 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by janeC-2 5 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#1236510

Hi,
I have created a site for people to enter details about their market stall.

I would like the user to only be able to create 1 listing. Is there a way to do this so they don't keep using the form and create multiple listings?

#1236512

There are several ways to achieve this but no inbuilt one.

One way is explained here.
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/#how-do-i-prevent-users-from-creating-more-than-one-contractor-post

Another way is to wrap the Form in an HTML condition, which listens to a post count of the user.
This requires a custom code snippet, which then you can use to produce a shortcode or function to use in the HTML Conditional.
hidden link
You can use the above snippet, it will then be possible to use the function in an HTML condition:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-custom-functions-in-conditions/

#1236521

My issue is resolved now. Thank you!
Thank you so much! You saved me once again 🙂