I am busy setting up an app for registrations for a talent competition.
My structure is to register a Guardian as a user for login purposes with a specific user profile.
Once the Guardian/manager has registered and logged in they will then access the app.
The following cpts has been created and prepopulated with content, Items.
The manager must then proceed to register the participants on the system, that, he will be responsible to register.
Once the participants have been registered they then need to create their entries for the competition. This was where I created a CPT "registration". This cpt will then have various relationships. The first selection must be that the item is that they will pick from the Items CPT. The next step is to pick the participants that will take part in the item. You can have various participate taking part from 1(one) to unlimited. But each participant must be linked to the items they are doing. Obviously, a participant can also participate in more than one item.
I have finished all the cpts with their respective cred input forms. and they work well. Now, this is where my trouble starts.
I need to create a CPT for the registration of an item and then I need to have a child of registrations with the various participants in the specific item registration.
I am not sure how to proceed with this step. as there will be related fields in the (registration)cpt to the item and a relationship between the Child of registrations, and the Participants.
Any assistance would be appreciated.
Hello and thank you for contacting the Toolset support.
I think that we have discussed this in chat yesterday, right? Unfortunately, I still do not understand what you would like to build. I suggest that you allow me temporary access to your website so I can see the available custom posts, their posts, the forms, the pages, and what is done so far. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Please provide more details about what is already set. Ex:
- Page URL(xxx) is meant to be used by (yyy) and it does (zzz).
From what I gathered so far, I believe that you need to use a Many-to-many relationship between Participants and Items. The intermediary posts for this relationship will represent a Participant registration in the Item. You can add custom fields to this relationship, for example, rating.
Read more about Many-to-many relationships in this article https://toolset.com/course-lesson/many-to-many-post-relationships/
You can read more about Toolset relationships in general by filtering our documentation index https://toolset.com/course-lesson/?wpv-related-lesson=post-relationships&wpv_view_count=1599013
Once you setup the relationship, create a relationship form and add it, either to the Item content template, so you can add participants to an Item. Or to the Participant content template, so you can register this participant in an Item.
Does this make sense? If not please take the time to read the first article that I shared, then get back here with your questions.
This being said, I believe that you won't need to use the "Registration" custom post type anymore because the intermediary post of the relationship will represent a participant's registration on an Item.
Hi Jamal,
That works like a bomb. It gives me exactly what I need. One have, hopely one last question. Is there a way to set up a cred form that you will link one item to many participants? instead of doing I one by one
Hello! Awesome, I am glad I could help.
Regarding your last question, it is not possible to connect multiple participants at once. Keep in mind that Toolset Forms allows to create or edit ONLY ONE post at a time. A relationship form allows creating one association at a time, which is actually the creation of the intermediary post and linking it to parent and child posts.
However, you can still implement this feature with some custom code. You can use a generic field, populate it using a shortcode or a view, then hook into the cred_save_data action and link all the values of the field to the parent post using the toolset_connect_posts function.
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
Check this example on how to populate a generic field using a view https://toolset.com/forums/topic/place-view-inside-generic-field/
For support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have to kindly ask you to open a new thread or chat if you need further assistance.
My issue is resolved now. Thank you!