- Add the mixin somewhere
- Duplicate the mixin instructions into your require-js
- Form XML:
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<!-- ... -->
<field ...>
<item name="config" xsi:type="array">
<!-- ... -->
<item name="fieldDependency" xsi:type="string">${ $.provider}:${ $.parentScope }.FIELD_TO_DEPEND_ON</item>
</item>
</field>
</form>
Where FIELD_TO_DEPEND_ON is the name (in the current scope) of the field you want this to only be visible if it has a truthy value.