Object Dynamic Select depending on other field

Good morning folks,

is there already a solution/bundle for the following?

The DataObject as has a Dynamic Select field which options should be dependend on a multihref/href/objects field.
Basically the Dynamic Select Provider gets the select options from a certain field within the object which is set in the objects field in the same DataObject.

So far I was not successful to find anything but I am pretty sure there is a sweet solution)


Old tpoic.
In the meantime, did you find a solution for this ?

Hm… Only solution I have in mind is an EventListener. Hook into the pre-send-data event from the admin interface (https://github.com/pimcore/pimcore/blob/master/lib/Event/AdminEvents.php#L304) and there you can retrieve the data from one field and change the data of the select-field before the object is opened.

But; This is definitely not the best solution because you have to reload the object after saving it in order to make the data available for the select field.

I just used this to dynamically set the data for a select field but the data gets selected from another place and not from the same object (which makes this so difficult).


Thanks for the answer.
I will look on th js side.

Hi, any possible solution for tha above?

Here’s a very similar topic that has a possible solution: Dynamic select box/multiselect box based on other field

Maybe that will point you in the right direction?