I have a ui-component

        <field name="interest" formElement="multiselect">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">customer</item>
                <item name="options" xsi:type="object">
                    <link name="customerId">${ $.provider }:data.customer.entity_id</link>
                <label translate="true">Interest</label>


And the data source come from InterestOptions.php

class InterestOptions implements OptionSourceInterface
    public function toOptionArray()

        return [
            'option1' => [
                'label' => 'Option 1',
                'value' => 'option1'
            'option2' => [
                'label' => 'Option 2',
                'value' => 'option2'

How can I auto checked some value by my own logic in my source php?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.