Tiered Select Controls?

Hi all,

how can I make a tiered select control for a block? I have a LOT of options that I dont want to load from a single control. But there are ‘tiers’ so to speak (or parent groups if you will) that each of the options that can be chosen belong to. So, instead of one select control I want two the first populating the second with the limited options.

How can I do this in PG? Would that make more sense if they were fields somewhere else (ACF etc) so I have something to pull them from? Would a text file (lets say JSON) I can read with js make more sense?

I have some other questions that relate to this, but lets see about the approach and then decide whats next.

Thanks in advance!

Bueller, Bueller, … (Bump for those not familiar)

Hi @Sebastian,

While I don’t have an immediate answer for you at the moment, I appreciate your input.

To better assist you and the community, it would be greatly helpful if you could provide a clear example or a wireframe illustrating your specific use case. This will allow us to better understand what you are trying to achieve and collectively brainstorm potential solutions or alternatives.

We look forward to hearing more details about your use case.

Best regards,

Thanks @Emmanuel I think you’re right and would make this easier to understand. This is what I am after in a simplified manner:

The first dropdown only shows the ‘categories’ and the second dropdown only shows the items for the selected category. I have data (categories & options) in a JSON file, but am not tied to this. I can use ACF custom fields, etc. For now I want to figure out how I can load the data dynamically.