I've searched the forum and found some posts to limit cred submissions but mostly are per user, which is not intended.
I have a CPT called Courses.
For each course I create i want to add a form to register pre-signups.
For this to happen (in my way of thinking) I will have to create a parent (course) and a child (student) and allow users to submit a cred form which is the pre-signup. I still don't know if only to registered users or to anyone.
1 - I believe toolset already allows me to do this easily correct?
But i want to limit the amount of cred submissions to 10 per course. So i will accept only 10 students per course.
2 - How can i achieve this with toolset?
In the view that lists the courses and when the course submissions reach 10 it should be listed with a "SOLD" badge, not allowing more signups.
If there is an easier way to do this I'm all ears!
1 - I believe toolset already allows me to do this easily correct?
But i want to limit the amount of cred submissions to 10 per course. So i will accept only 10 students per course.
It sounds to me that you only want the course to have only 10 students. In a case like this there is a limiter option in the relationship settings screen for you to limit the number of students/child posts the Parent can have. See Screenshot
2 - How can i achieve this with toolset?
In the view that lists the courses and when the course submissions reach 10 it should be listed with a "SOLD" badge, not allowing more signups.
This one will require a bit of custom code to achieve. You will essentially need to count the child posts and display the Sold Badge if the count is equal to 10. Here is a previous forum thread that should be able to help you on this one. https://toolset.com/forums/topic/child-posts-count/#post-1228347
I have only issue here which might complicate things quite a bit.
What If I want to define in each course the number of signups separatly? Some courses will have more participants than others.
But this is only applied when user is actually filling the form.
If I insert a hidden field in the parent (course) called number of participants, using custom shortcodes i will be able to:
1 - inside a course list view (loop) check if the course number of childs created (pre-signups) is under the "limit field", if true do nothing ... else place a badge "SOLD".
2 - Inside the single course page make the signup button inactive and with different text.
I have only issue here which might complicate things quite a bit.
What If I want to define in each course the number of signups separatly? Some courses will have more participants than others.
It will probably be doable if the user is only creating the posts through the frontend.
1 - inside a course list view (loop) check if the course number of child created (pre-signups) is under the "limit field", if true do nothing ... else place a badge "SOLD".