How we can make depend parameters with multiple values in widget xml config?
Did you see an example in the core?
I have just find example similar (depend with multiple values not single value) in the core but i don’t see this (widget setting context).
I only see this in system config context.
Can you suggest me, how to do this?
What kind of dependency do you need?
Hi
Example this working fine in system.xml:
<field id="category_ids" translate="label" type="multiselect" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Select Categories</label>
<source_model>Vendor\ModuleName\Model\Config\Source\Categories</source_model>
<comment>Select categories to filter</comment>
<depends>
<field id="content_type" separator=",">latest_products,new_products,hot_products,random_products</field>
</depends>
</field>
and i want a solution to do that in widget.xml config.
See the article: how does a backend config field <depends>
condition work?
Some widgets use it too, for example:
Hi Dmitry Fedyuk,
That is a dependency with single value.
Our case is depend with multiple values
Thanks.
Just try it with multiple: may be it works, especially if it uses the same JavaScript library (FormElementDependenceController
).
I have just try to do that in widget.xml but it is not working.
Can you suggest me a example?
Thanks!