Hello and thank you for contacting the Toolset support.
To be able to hide or show something based on a dropdown selection, you will need to use Javascript custom code. This being said, the implementation will depend on how you implemented the custom fields.
Personally, I would create a Repeatable Fields Group with multiple fields:
- Language origin: this will serve as the group for languages.
- Language: this will hold the language.
- The options: this will hold what you want to hide/show based on the language selection.
First method
Then, I'll display this using two views on the legacy editor. Because the legacy editor will allow me to dynamically add a CSS class to the generated results.
Once view will generate the dropdown. To be able to group languages within the same language origin, you will need to order the view by that field, and implement a custom shortcode to group them. Check this article to see how to group results by a custom field https://toolset.com/2013/10/how-to-group-views-results-by-year-and-month/
The second view will display the options and will wrap them inside a div that has a CSS class(let's use the language as the class, and we'll need to have it as a word, no spaces inside of it).
Then you can implement some Javascript code that will listen for the change event on the first view, and display the corresponding options from the other views.
Second method
I'll use one view that displays the language origin, the language, and the options. Then, using Javascript code, I'll build the dropdown, listen to the change event, and hide/show the corresponding options.
Read this article on how to create and display repeatable field groups.
However, you may implement a different design that won't require any custom Javascript code. For example, you can build an accordion using a 3rd party plugin that offers it. The Kadence blocks do offer an accordion block and they are compatible with Toolset.
I hope this makes sense. Let me know if you have any questions.