Tell us what you are trying to do?
Tell us what you are trying to do?
Hi,
I am creating a business directory. I have 4 Custom posts type
1. Products
2.Product Sector
3. Product Sub-Sector
4. Product Categories
Note that a product can be classified in to 3 levels;
level 1 -Product Sector
Level 2-Product Sub-Sector
Level 3-Product Categories
The relationships include the following.
1.Product sector can has one to many relationship with Sub-Sector
2.Product Sub-Sector has a one to many relationship with Product Categories
3.Product Sector has a one to many relationship with Products
4.Product Sub-Sector has a one to many relationship with Products
5.Product Categories has a one to many relationship with Products
I have created a form representing the products Custom Post Type.Products contains the relationships created in form of input fields namely;
1. Product Sector input field
2. Product Sub-Sector input field
3. Product Categories input field
I want the Product Form to have a cascading input field or your may call it conditional drop down. In the product form when I select A sector e.g Manufacturing, Then the Input field for sub-sector should restrict me to only the sub-sectors related to Manufacturing Sector. The same should apply to product category when a specific Product Sub Sector is selected.
Is there any documentation that you are following?
Yes I am using Toolset's WordPress Directory and Classifieds Sites Course
Hello. Thank you for contacting the Toolset support.
The thing is that you can filter your parent select dropdown select using the author field:
=> https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field
author Optional. Use it with a parent selector field to specify that the list of parent posts should be limited to those authored by the mentioned user ID. The value $current can be used to define that the current user should only see their own parent posts in a dropdown.