[Resolved] CPT repeatable group field that creates a drop-down with custom values.
This support ticket is created 6 years, 4 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
in the Events, I would like to allow Club Owners to add events, and inside those events, I want them to be able to set different pricing. I.e., "General Admission - $5", "VIP Admission - $10", etc.).
My assumption is that within the Field Group of the Events type, I create a Repeatable Group (maybe calling it "Admission Pricing") and then in that group, create two fields:
- Admission Type Name
- Admission Type Price
Then, when the user sees the form on the front end, they can add the various Admission Pricing to the event.
The question becomes - how to display to the visitor looking at the event on the front end the Admission Pricing options in a drop-down that shows the Admission Type Name with the value of the Admission Type Price?
Hello. Thank you for contacting the Toolset support.
Well - the structure you are thinking is possible to implement in backend but the thing is that you can not use the repeating field group with Toolset forms on fronend as its not supported.
The Toolset Repeatale Groups is based on posts, each item of repeatable field group is a single post, but Toolset form (CRED) can create/edit only one post in each form, it can not create the multiple posts in one Toolset form.
For example, let us say you have a post type called “Houses” and a repeatable field group for “Rooms” that belongs to each house. You can create a separate form that allows users to add/edit “rooms” to existing houses.
You may need to think about another structure, may be another post type that holds the admissions and create appropriate relationship between desired post types.
Ok, great. I think I understand that now. Makes sense to me.
So then, would it be possible to then to simply have a button (or link) that opens a small form for the Admissions PT, and that entry would be associated by relationship to that single Event?