I am developing a lottery tickets booking platform for groups of people. I have created a new user role that can create new groups or organizations. So, this role is able to create custom posts “Organizations”. Once a new Organization’s post is created, the link is shared by the Organization’s owner to all the group members externally to the platform.
Organizations have a one to many relationship with another custom post which is Numbers. This Numbers post stores the lottery number (post title), the amount of lottery shares, the bookings final date and the inventory of the remaining lottery shares.
Numbers have a one to many relationship with another custom post which is Bookings. This Booking post stores the booked amount and the booker’s personal data.
So, what I have is this one to many relationship structure:
Organizations → Numbers → Bookings
When a booker accesses the Organizations page, a front-end form is displayed to allow booking as many lottery tickets of the same number as desired. This form has a select field which should display Organization’s Numbers with the following restrictions:
The Numbers displayed must belong to the Organization (relationship Organizations → Numbers)
The Number’s lottery ticket inventory must be greater than 0.
The current date must be lower or equal to the bookings final date for the displayed Number.
All the above structure has been created and tested. However, the select field displays all the Numbers in the platform without any restriction related to Organization, inventory or date.
How should I configure this select field to match the above conditions?
Hello. Thank you for contacting the Toolset support.
Well - there are multiple ways but once I check the actual setup I will be able to guide you what would be the best option to go with.
Can you please share admin access details as well as login access details for booker user and setup a test organization and share link where I can see the form as well as tell me what is your expected result with the select field on that page with that booker user.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Can you please share problem URL and tell me where I can see the form?
Also, Can you please share admin access details and frontend user booker user access details so I can login as Booker user and access the form and on that form what is your expected output with the parent dropdown select field?
I have set the next reply to private which means only you and I have access to it.