So, in this topic (https://toolset.com/forums/topic/drop-down-menus-for-countries-and-cities-in-dependency/), with the Christian Cox suggestion and Toolset guide, I have used the Toolset Relationship functions, to set some post dependencies. Well, I have created the Profile CPT that it is child of Città CPT, that it is child of Provincia CPT, that it is child of Regione CPT, that it is child of Stato CPT, all with parents with an address custom field.
And so, now I'm trying to create the Custom Search and I cannot add the form to search the posts about its dependencies (parent, grand parent, grand grand parent, grand grand grand parent).
So, a solution that I have thought is to create the relative Address Custom Fields into Profile CPT posts, to dynamically save the values about the Parent, Grand Parent, etc... Address Custom Fields. But I don't know what custom code I need to use...
And also, If there is a solution to do what I need, to integrate the Select2 to select the items in Custom Search, because only the Città CPT have up to 8000 items....
Can you help me on that? Because if there are no solutions to do that, all work and all the time will be lost...
Can I pay to have what I need!!!!
Referring specifically to the question of how you can make a select field with many options work like a select2 dropdown, you can convert the dropdown to select2 yourself.
First you will need to enqueue the select2 JS and CSS files.
Then, as per the select2 documentation (hidden link), you simply need to instantiate select2 on the select input, which would mean adding something like the following to the custom JS section of the View where you want one of the select filter inputs to work via select2: