CustomSelector dependant on other input

Enonic version: 6.15.1
OS: Debian

Is it possible to pass the value of another input to a custom selector service ?

Basically I have a structure where you start by selecting a category (ComboBox with static options), then I would like to pass the value of this category input to a CustomSelector service to populate dynamic sub categories based on category.

1 Like

Did you check out our sample integration with Google Books API in the documentation of Custom Selector? I believe it’s similar to what you need (but you will need to trigger a request to the Custom Selector service after a value in the regular combo was selected).

I am unable to find any reference to passing non static params to a service in that example.

Is it possible to pass a non static param to the CustomSelector service, something like this:

<param value="categoryKey">${categoryKey}</param>

(or similar syntax)

?

How do you plan to deal with this setting in the UI?

not sure I understand the question, but I planned to make the service behind the CustomSelector listen for the categoryId parameter, if not set then return all possible sub categories, otherwise only return the ones that are relevant for the particular categoryId

I missed your first post there… at the moment this will not work reliably as you are dependent on the category selection to be saved before you can access it on the server. Content Studio will be refactored to save continously next year.

So, right now I believe the answer is no.